diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts index 7a3040391..5cd501cf8 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts @@ -208,6 +208,12 @@ export class GfAccountDetailDialogComponent implements OnInit { this.dialogRef.close(); } + public showValuesInPercentage() { + return ( + this.data.hasImpersonationId || this.user?.settings?.isRestrictedView + ); + } + private fetchAccount() { this.dataService .fetchAccount(this.data.accountId) diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html index 54e786734..e63fb9fc1 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html @@ -24,9 +24,7 @@ class="h-100" [currency]="user?.settings?.baseCurrency" [historicalDataItems]="historicalDataItems" - [isInPercentage]=" - data.hasImpersonationId || user.settings.isRestrictedView - " + [isInPercentage]="showValuesInPercentage()" [isLoading]="isLoadingChart" [locale]="user?.settings?.locale" /> @@ -118,9 +116,7 @@ [deviceType]="data.deviceType" [hasPermissionToCreateActivity]="false" [hasPermissionToDeleteActivity]="false" - [hasPermissionToExportActivities]=" - !data.hasImpersonationId && !user.settings.isRestrictedView - " + [hasPermissionToExportActivities]="!showValuesInPercentage()" [hasPermissionToFilter]="false" [hasPermissionToOpenDetails]="false" [locale]="user?.settings?.locale"