Browse Source

Task/refactor showValuesInPercentage() in account detail dialog component (#6698)

* Refactoring
pull/6725/head
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
66dbde6789
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
  2. 8
      apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html

6
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)

8
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"

Loading…
Cancel
Save