feat: add loan button (close action) (#855)

Fixes: #849
This commit is contained in:
Muskan Khedia
2020-06-09 10:27:33 +05:30
committed by GitHub
parent 347e84f366
commit a3f60783dc
17 changed files with 222 additions and 14 deletions
+10
View File
@@ -21,6 +21,11 @@ export class LoansService {
return this.http.get(`/loans/${loanId}/charges/template`);
}
getLoanChargeTemplate(loanId: string, command: string): Observable<any> {
const httpParams = new HttpParams().set('command', command);
return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams });
}
/**
* @param {any} loanCharge to apply on a Loan Account.
* @returns {Observable<any>}
@@ -85,4 +90,9 @@ export class LoansService {
return this.http.delete(`/loans/${loanId}/notes/${noteId}`);
}
closeAccount(loanId: string, closeData: any) {
const httpParams = new HttpParams().set('command', 'close');
return this.http.post(`/loans/${loanId}/transactions`, closeData, {params: httpParams});
}
}