feat: add savings charge form (#726)

Fixes: #250
This commit is contained in:
Abhijeet Singh
2020-06-07 22:57:18 +05:30
committed by GitHub
parent 5d77a9c676
commit 347e84f366
9 changed files with 362 additions and 28 deletions
@@ -0,0 +1,30 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { SavingsService } from '../savings.service';
/**
* Savings Charge Template data resolver.
*/
@Injectable()
export class SavingsChargeTemplateResolver implements Resolve<Object> {
/**
* @param {SavingsService} SavingsService savings service.
*/
constructor(private savingsService: SavingsService) {}
/**
* Returns the Savings Charge Template.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const savingAccountId = route.paramMap.get('savingAccountId');
return this.savingsService.getSavingsChargeTemplateResource(savingAccountId);
}
}