Browse Source
Task/refactor showValuesInPercentage() in account detail dialog component (#6698)
* Refactoring
pull/6725/head
Thomas Kaul
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
8 additions and
6 deletions
-
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
-
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
|
|
|
@ -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) |
|
|
|
|
|
|
|
@ -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" |
|
|
|
|