feat: add create savings account page (#883)

Fixes: #882
This commit is contained in:
Karan Takalkar
2020-06-19 21:14:07 +05:30
committed by GitHub
parent 21c54d0baa
commit 2418e2ed02
28 changed files with 1424 additions and 16 deletions
@@ -0,0 +1,32 @@
/** 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 Account Template resolver.
*/
@Injectable()
export class SavingsAccountTemplateResolver implements Resolve<Object> {
/**
* @param {savingsService} SavingsService Savings service.
*/
constructor(private savingsService: SavingsService) { }
/**
* Returns the Shares Account Template.
* @param {ActivatedRouteSnapshot} route Route Snapshot
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const clientId = route.parent.parent.paramMap.get('clientId');
return this.savingsService.getSavingsAccountTemplate(clientId);
}
}