feat: fixed deposit account actions (close) (#997)

Fixes: #996
This commit is contained in:
Karan Takalkar
2020-07-05 17:54:27 +05:30
committed by GitHub
parent 1a89f0a4cb
commit efac58fc68
8 changed files with 236 additions and 6 deletions
@@ -7,6 +7,7 @@ import { Observable } from 'rxjs';
/** Custom Services */
import { SavingsService } from 'app/savings/savings.service';
import { FixedDepositsService } from '../fixed-deposits.service';
/**
* Fixed Deposits Account Actions data resolver.
@@ -16,8 +17,10 @@ export class FixedDepositsAccountActionsResolver implements Resolve<Object> {
/**
* @param {SavingsService} SavingsService Savings service.
* @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service.
*/
constructor(private savingsService: SavingsService) { }
constructor(private savingsService: SavingsService,
private fixedDepositsService: FixedDepositsService) { }
/**
* Returns the Fixed deposits account actions data.
@@ -30,6 +33,8 @@ export class FixedDepositsAccountActionsResolver implements Resolve<Object> {
switch (actionName) {
case 'Add Charge':
return this.savingsService.getSavingsChargeTemplateResource(fixedDepositAccountId);
case 'Close':
return this.fixedDepositsService.getFixedDepositsAccountClosureTemplate(fixedDepositAccountId);
default:
return undefined;
}