feat: add view loan (loan documents tab) (#1126)

Fixes: #818
This commit is contained in:
Muskan Khedia
2020-07-17 21:07:11 +05:30
committed by GitHub
parent a13510dae1
commit 48709edba0
16 changed files with 381 additions and 8 deletions
@@ -0,0 +1,31 @@
/** 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';
/**
* Loans notes resolver.
*/
@Injectable()
export class LoanNotesResolver implements Resolve<Object> {
/**
* @param {LoansService} LoansService Loans service.
*/
constructor(private loansService: LoansService) { }
/**
* Returns the Loans data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const loanId = route.parent.paramMap.get('loanId');
return this.loansService.getLoanNotes(loanId);
}
}