Bugfix/show transfer balance button based on permission (#2489)
* Show button depending on permission * Update changelog
This commit is contained in:
parent
20f9225daa
commit
bf816c3b89
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user