feat: add loan view page (notes tab) (#819)

Fixes: #815
This commit is contained in:
Muskan Khedia
2020-06-01 09:49:02 +05:30
committed by GitHub
parent 9313c92af4
commit 03774be790
10 changed files with 319 additions and 66 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);
}
}