feat: add edit savings account page (#884)

Fixes: #222
This commit is contained in:
Karan Takalkar
2020-06-20 17:34:38 +05:30
committed by GitHub
parent 2418e2ed02
commit 7c64c849d3
18 changed files with 397 additions and 54 deletions
@@ -53,10 +53,10 @@
<th mat-header-cell *matHeaderCellDef> Date </th>
<td mat-cell *matCellDef="let charge">
<span *ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
{{charge.dueDate || 'Unassigned'}}
{{(charge.dueDate | date) || 'Unassigned'}}
</span>
<span *ngIf="charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'">
{{charge.feeOnMonthDay || 'Unassigned'}}
{{(charge.feeOnMonthDay | date) || 'Unassigned'}}
</span>
<span
*ngIf="!(charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'
@@ -50,7 +50,7 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
ngOnInit() {
this.currencyCode.valueChanges.subscribe(() => {
if (!this.isChargesPatched && this.savingsAccountTemplate.charges) {
this.chargesDataSource = this.savingsAccountTemplate.charges || [];
this.chargesDataSource = this.savingsAccountTemplate.charges.map((charge: any) => ({...charge, id: charge.chargeId})) || [];
this.isChargesPatched = true;
} else {
this.chargesDataSource = [];
@@ -84,7 +84,7 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
controlName: 'amount',
label: 'Amount',
value: charge.amount,
type: 'text',
type: 'number',
required: false
}),
];