Datatable views updates for display values with format (#1603)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
eae1b350b7
commit
7bbab6423e
@@ -4,14 +4,18 @@
|
||||
<fa-icon icon="flag"></fa-icon>
|
||||
Edit
|
||||
</button>
|
||||
<button mat-raised-button color="accent" *mifosxHasPermission="'PAY_SAVINGSACCOUNTCHARGE'" (click)="payCharge()">
|
||||
<fa-icon icon="dollar-sign"></fa-icon>
|
||||
Pay
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *mifosxHasPermission="'WAIVE_SAVINGSACCOUNTCHARGE'" (click)="waiveCharge()">
|
||||
<fa-icon icon="flag"></fa-icon>
|
||||
Waive
|
||||
</button>
|
||||
<span *ngIf="allowPayCharge">
|
||||
<button mat-raised-button color="accent" *mifosxHasPermission="'PAY_SAVINGSACCOUNTCHARGE'" (click)="payCharge()">
|
||||
<fa-icon icon="dollar-sign"></fa-icon>
|
||||
Pay
|
||||
</button>
|
||||
</span>
|
||||
<span *ngIf="allowWaive">
|
||||
<button mat-raised-button color="primary" *mifosxHasPermission="'WAIVE_SAVINGSACCOUNTCHARGE'" (click)="waiveCharge()">
|
||||
<fa-icon icon="flag"></fa-icon>
|
||||
Waive
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loansAccountData.status.value === 'Submitted and pending approval'" fxLayout="row" fxLayoutAlign="end"
|
||||
|
||||
@@ -32,6 +32,8 @@ export class ViewChargeComponent {
|
||||
chargeData: any;
|
||||
/** Loans Account Data */
|
||||
loansAccountData: any;
|
||||
allowPayCharge = true;
|
||||
allowWaive = true;
|
||||
|
||||
/**
|
||||
* Retrieves the Charge data from `resolve`.
|
||||
@@ -50,6 +52,8 @@ export class ViewChargeComponent {
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { loansAccountCharge: any, loanDetailsData: any }) => {
|
||||
this.chargeData = data.loansAccountCharge;
|
||||
this.allowPayCharge = (this.chargeData.chargeTimeType.code === 'chargeTimeType.instalmentFee');
|
||||
this.allowWaive = !this.chargeData.chargeTimeType.waived;
|
||||
this.loansAccountData = data.loanDetailsData;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user