feat: savings account view charge (#939)

Fixes: #938
This commit is contained in:
Karan Takalkar
2020-06-27 23:22:22 +05:30
committed by GitHub
parent 6ed67a763d
commit 222681b916
21 changed files with 602 additions and 14 deletions
@@ -0,0 +1,116 @@
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
<span *ngIf="savingsAccountData.status.value === 'Active' && chargeData.amountOutstanding !== 0">
<button mat-raised-button color="accent" *mifosxHasPermission="'PAY_SAVINGSACCOUNTCHARGE'" (click)="payCharge()">
<fa-icon icon="dollar-sign"></fa-icon>&nbsp;&nbsp;
Pay Charge
</button>
<button mat-raised-button color="primary" *mifosxHasPermission="'WAIVE_SAVINGSACCOUNTCHARGE'" (click)="waiveCharge()">
<fa-icon icon="flag"></fa-icon>&nbsp;&nbsp;
Waive Charge
</button>
<span *ngIf="isRecurringCharge()">
<button mat-raised-button color="warn" *mifosxHasPermission="'INACTIVATE_SAVINGSACCOUNTCHARGE'" (click)="inactivateCharge()">
<fa-icon icon="trash"></fa-icon>&nbsp;&nbsp;
Inactivate Charge
</button>
</span>
</span>
</div>
<div class="container">
<mat-card>
<mat-card-content>
<div fxLayout="row wrap" class="content">
<div fxFlex="50%" class="mat-body-strong">
Name
</div>
<div fxFlex="50%">
{{ chargeData.name }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Charge Type
</div>
<div fxFlex="50%">
{{ chargeData.penalty ? 'Penalty' : 'Fees' }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Currency
</div>
<div fxFlex="50%">
{{ chargeData.currency.displayLabel }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Payment due at
</div>
<div fxFlex="50%">
{{ chargeData.chargeTimeType.value }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Payment due as of
</div>
<div fxFlex="50%">
{{ chargeData.dueDate | date }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Calculation Type
</div>
<div fxFlex="50%">
{{ chargeData.chargeCalculationType.value }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Due
</div>
<div fxFlex="50%">
{{ chargeData.amount }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Paid
</div>
<div fxFlex="50%">
{{ chargeData.amountPaid }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Waived
</div>
<div fxFlex="50%">
{{ chargeData.amountWaived }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Outstanding
</div>
<div fxFlex="50%">
{{ chargeData.amountOutstanding }}
</div>
</div>
</mat-card-content>
</mat-card>
</div>