feat: add loan view page (charges tab) (#820)

Fixes: #816
This commit is contained in:
Muskan Khedia
2020-06-01 14:55:10 +05:30
committed by GitHub
parent 03774be790
commit 51c29a073e
10 changed files with 231 additions and 4 deletions
+16 -1
View File
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpParams } from '@angular/common/http';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -29,10 +29,25 @@ export class LoansService {
return this.http.post(`/loans/${loanId}/${resourceType}`, loanCharge);
}
/**
* Get Loan Account Details
* @param loanId Loan Id
*/
getLoanAccountDetails(loanId: string) {
return this.http.get(`/loans/${loanId}`);
}
/**
* Get Loans details with httpParams
* @param loanId Loan ID
*/
getLoanAccountAssociationDetails(loanId: string) {
const httpParams = new HttpParams()
.set('associations', 'all')
.set('exclude', 'guarantors,futureSchedule');
return this.http.get(`/loans/${loanId}`, {params: httpParams});
}
/**
* @param loanId Loan Id
* @returns The notes for particular loan