feat: add bulk loan reassignment component (#792)

Fixes: #754
This commit is contained in:
Benura Abeywardena
2020-08-02 11:51:56 +05:30
committed by GitHub
parent 6a47a69007
commit 780fc000cb
8 changed files with 358 additions and 2 deletions
@@ -56,6 +56,37 @@ export class OrganizationService {
return this.http.get('/offices');
}
/**
* Get Office Template.
* @param {string} officeId Office Id of the office selected.
* @returns {Observable<any>} Office Template.
*/
getOfficeTemplate(officeId: string): Observable<any> {
const httpParams = new HttpParams().set('officeId', officeId.toString());
return this.http.get(`/loans/loanreassignment/template`, { params: httpParams });
}
/**
* Get Officer Template.
* @param officerId Officer Id.
* @param officeId Office Id.
*/
getOfficerTemplate(officerId: string, officeId: string): Observable<any> {
const httpParams = new HttpParams()
.set('fromLoanOfficerId', officerId.toString())
.set('officeId', officerId.toString());
return this.http.get('/loans/loanreassignment/template', { params: httpParams });
}
/**
* Bulk Loan Reassignment.
* @param loanData Load Data to be created.
* @returns {Observable<any>}
*/
createLoanReassignment(loanData: any): Observable<any> {
return this.http.post('/loans/loanreassignment', loanData);
}
/**
* @param {string} officeId Office ID of Office.
* @param {boolean} template