feat: add edit loan accounts (#1131)

Fixes: #220
This commit is contained in:
Muskan Khedia
2020-07-18 15:46:07 +05:30
committed by GitHub
parent 3b2fb388ae
commit 8a360025f8
14 changed files with 515 additions and 179 deletions
@@ -0,0 +1,29 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { LoansService } from '../loans.service';
/**
* Loan accounts template data resolver.
*/
@Injectable()
export class LoansAccountAndTemplateResolver implements Resolve<Object> {
/**
* @param {ProductsService} productsService Products service.
*/
constructor(private loansService: LoansService) { }
/**
* Returns the loan account template data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const loanId = route.parent.paramMap.get('loanId');
return this.loansService.getLoansAccountAndTemplateResource(loanId);
}
}