feat: add loan action (add collateral) (#842)

Fixes: #831
This commit is contained in:
Benura Abeywardena
2020-07-12 17:21:39 +05:30
committed by GitHub
parent 74c816a36c
commit ac529dbae8
10 changed files with 169 additions and 1 deletions
+20 -1
View File
@@ -71,10 +71,29 @@ export class LoansService {
* Get Loan Account Details
* @param loanId Loan Id
*/
getLoanAccountDetails(loanId: string) {
getLoanAccountDetails(loanId: string): Observable<any> {
return this.http.get(`/loans/${loanId}`);
}
/**
* Get collateral template.
* @param {string} loanId Loan Id.
* @returns {Observable<any>}
*/
getLoanCollateralTemplate(loanId: string): Observable<any> {
return this.http.get(`/loans/${loanId}/collaterals/template`);
}
/**
* Create Loan Collateral.
* @param {string} loanId Loan Id.
* @param {any} collateralData Collateral Data.
* @returns {Observable<any>}
*/
createLoanCollateral(loanId: string, collateralData: any): Observable<any> {
return this.http.post(`/loans/${loanId}/collaterals`, collateralData);
}
/**
* Get Loans details with httpParams
* @param loanId Loan ID