Browse Source

Handle impersonation and restricted view

pull/3464/head
Thomas Kaul 1 year ago
parent
commit
49c3e610e3
  1. 8
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

8
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

@ -505,7 +505,11 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
}
}
if (this.positions[symbol].assetSubClass === 'ETF') {
if (
this.positions[symbol].assetSubClass === 'ETF' &&
!this.hasImpersonationId &&
!this.user.settings.isRestrictedView
) {
this.totalValueInEtf += this.positions[symbol].value;
}
@ -553,6 +557,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
this.markets[UNKNOWN_KEY].value =
this.markets[UNKNOWN_KEY].value / marketsTotal;
if (!this.hasImpersonationId && !this.user.settings.isRestrictedView) {
this.topHoldings = Object.values(this.topHoldingsMap)
.map(({ name, value }) => {
return {
@ -566,6 +571,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
return b.valueInBaseCurrency - a.valueInBaseCurrency;
});
}
}
private openAccountDetailDialog(aAccountId: string) {
const dialogRef = this.dialog.open(AccountDetailDialog, {

Loading…
Cancel
Save