Browse Source

Fix value column of top holdings in Presenter View

pull/7971/head
Thomas Kaul 2 weeks ago
parent
commit
03191683c2
  1. 1
      apps/client/src/app/pages/portfolio/allocations/allocations-page.html
  2. 15
      libs/ui/src/lib/top-holdings/top-holdings.component.ts

1
apps/client/src/app/pages/portfolio/allocations/allocations-page.html

@ -341,6 +341,7 @@
<mat-card-content>
<gf-top-holdings
[baseCurrency]="user?.settings?.baseCurrency"
[hasPermissionToShowValues]="!showValuesInPercentage()"
[locale]="user?.settings?.locale"
[pageSize]="10"
[topHoldings]="topHoldings"

15
libs/ui/src/lib/top-holdings/top-holdings.component.ts

@ -39,6 +39,7 @@ import { GfValueComponent } from '../value/value.component';
})
export class GfTopHoldingsComponent implements OnChanges {
@Input() baseCurrency: string;
@Input() hasPermissionToShowValues = true;
@Input() locale = getLocale();
@Input() pageSize = Number.MAX_SAFE_INTEGER;
@Input() topHoldings: HoldingWithParents[];
@ -48,14 +49,18 @@ export class GfTopHoldingsComponent implements OnChanges {
@ViewChild(MatPaginator) paginator: MatPaginator;
public dataSource = new MatTableDataSource<HoldingWithParents>();
public displayedColumns: string[] = [
'name',
'valueInBaseCurrency',
'allocationInPercentage'
];
public displayedColumns: string[] = [];
public isLoading = true;
public ngOnChanges() {
this.displayedColumns = ['name'];
if (this.hasPermissionToShowValues) {
this.displayedColumns.push('valueInBaseCurrency');
}
this.displayedColumns.push('allocationInPercentage');
this.isLoading = true;
this.dataSource = new MatTableDataSource(this.topHoldings);

Loading…
Cancel
Save