refactor: savings module (#1226)

See: #1196
This commit is contained in:
Karan Takalkar
2020-08-25 17:46:54 +05:30
committed by GitHub
parent f215e1aa96
commit efdd779aa9
30 changed files with 129 additions and 103 deletions
@@ -43,8 +43,8 @@ export class ApplyAnnualFeesSavingsAccountComponent implements OnInit {
private route: ActivatedRoute,
private router: Router) {
this.accountId = this.route.parent.snapshot.params['savingAccountId'];
this.route.parent.data.subscribe((data: { savingsAccountData: any }) => {
this.savingsAccountData = data.savingsAccountData;
this.route.data.subscribe((data: { savingsAccountActionData: any }) => {
this.savingsAccountData = data.savingsAccountActionData;
});
}
@@ -45,10 +45,8 @@ export class CloseSavingsAccountComponent implements OnInit {
private route: ActivatedRoute,
private router: Router) {
this.route.data.subscribe((data: { savingsAccountActionData: any }) => {
this.paymentTypeOptions = data.savingsAccountActionData.paymentTypeOptions;
});
this.route.parent.data.subscribe((data: { savingsAccountData: any }) => {
this.transactionAmount = data.savingsAccountData.summary.accountBalance;
this.paymentTypeOptions = data.savingsAccountActionData[0].paymentTypeOptions;
this.transactionAmount = data.savingsAccountActionData[1].summary.accountBalance;
});
this.accountId = this.route.parent.snapshot.params['savingAccountId'];
}