Browse Source

Feature/add quantity to holdings table of account detail dialog (#5379)

* Add quantity column

* Update changelog
pull/1946/merge
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
614dd07836
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 1
      apps/client/src/app/components/home-holdings/home-holdings.html
  3. 1
      apps/client/src/app/pages/public/public-page.html
  4. 24
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  5. 5
      libs/ui/src/lib/holdings-table/holdings-table.component.ts

1
CHANGELOG.md

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Included accounts in the search results of the assistant
- Included the data source in the asset profile search results of the assistant
- Added the quantity column to the holdings table of the account detail dialog
### Changed

1
apps/client/src/app/components/home-holdings/home-holdings.html

@ -48,6 +48,7 @@
<gf-holdings-table
[baseCurrency]="user?.settings?.baseCurrency"
[deviceType]="deviceType"
[hasPermissionToShowQuantities]="false"
[holdings]="holdings"
[locale]="user?.settings?.locale"
(holdingClicked)="onHoldingClicked($event)"

1
apps/client/src/app/pages/public/public-page.html

@ -201,6 +201,7 @@
[data]="holdings"
[deviceType]="deviceType"
[hasPermissionToOpenDetails]="false"
[hasPermissionToShowQuantities]="false"
[hasPermissionToShowValues]="false"
[pageSize]="7"
/>

24
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -64,6 +64,30 @@
</td>
</ng-container>
<ng-container matColumnDef="quantity">
<th
*matHeaderCellDef
class="d-none d-lg-table-cell justify-content-end px-1"
mat-header-cell
mat-sort-header
>
<ng-container i18n>Quantity</ng-container>
</th>
<td
*matCellDef="let element"
class="d-none d-lg-table-cell px-1"
mat-cell
>
<div class="d-flex justify-content-end">
<gf-value
[isCurrency]="true"
[locale]="locale"
[value]="isLoading ? undefined : element.quantity"
/>
</div>
</td>
</ng-container>
<ng-container matColumnDef="valueInBaseCurrency">
<th
*matHeaderCellDef

5
libs/ui/src/lib/holdings-table/holdings-table.component.ts

@ -52,6 +52,7 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy {
@Input() baseCurrency: string;
@Input() deviceType: string;
@Input() hasPermissionToOpenDetails = true;
@Input() hasPermissionToShowQuantities = true;
@Input() hasPermissionToShowValues = true;
@Input() holdings: PortfolioPosition[];
@Input() locale = getLocale();
@ -73,6 +74,10 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy {
public ngOnChanges() {
this.displayedColumns = ['icon', 'nameWithSymbol', 'dateOfFirstActivity'];
if (this.hasPermissionToShowQuantities) {
this.displayedColumns.push('quantity');
}
if (this.hasPermissionToShowValues) {
this.displayedColumns.push('valueInBaseCurrency');
}

Loading…
Cancel
Save