Browse Source
Bugfix/show transfer balance button based on permission (#2489)
* Show button depending on permission
* Update changelog
pull/2492/head
Thomas Kaul
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
11 additions and
5 deletions
-
CHANGELOG.md
-
apps/client/src/app/components/accounts-table/accounts-table.component.html
-
apps/client/src/app/pages/accounts/accounts-page.component.ts
-
apps/client/src/app/pages/accounts/accounts-page.html
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. |
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Displayed the transfer cash balance button based on a permission |
|
|
|
|
|
|
|
## 2.11.0 - 2023-10-14 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
<div class="d-flex justify-content-end"> |
|
|
|
<div *ngIf="showActions" class="d-flex justify-content-end"> |
|
|
|
<button |
|
|
|
class="align-items-center d-flex" |
|
|
|
mat-stroked-button |
|
|
|
|
|
@ -30,7 +30,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit { |
|
|
|
public deviceType: string; |
|
|
|
public hasImpersonationId: boolean; |
|
|
|
public hasPermissionToCreateAccount: boolean; |
|
|
|
public hasPermissionToDeleteAccount: boolean; |
|
|
|
public hasPermissionToUpdateAccount: boolean; |
|
|
|
public routeQueryParams: Subscription; |
|
|
|
public totalBalanceInBaseCurrency = 0; |
|
|
|
public totalValueInBaseCurrency = 0; |
|
|
@ -95,9 +95,9 @@ export class AccountsPageComponent implements OnDestroy, OnInit { |
|
|
|
this.user.permissions, |
|
|
|
permissions.createAccount |
|
|
|
); |
|
|
|
this.hasPermissionToDeleteAccount = hasPermission( |
|
|
|
this.hasPermissionToUpdateAccount = hasPermission( |
|
|
|
this.user.permissions, |
|
|
|
permissions.deleteAccount |
|
|
|
permissions.updateAccount |
|
|
|
); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
|
|
@ -8,7 +8,7 @@ |
|
|
|
[baseCurrency]="user?.settings?.baseCurrency" |
|
|
|
[deviceType]="deviceType" |
|
|
|
[locale]="user?.settings?.locale" |
|
|
|
[showActions]="!hasImpersonationId && hasPermissionToDeleteAccount && !user.settings.isRestrictedView" |
|
|
|
[showActions]="!hasImpersonationId && hasPermissionToUpdateAccount && !user.settings.isRestrictedView" |
|
|
|
[totalBalanceInBaseCurrency]="totalBalanceInBaseCurrency" |
|
|
|
[totalValueInBaseCurrency]="totalValueInBaseCurrency" |
|
|
|
[transactionCount]="transactionCount" |
|
|
|