feat: standing instructions history (#1177)

Fixes: #1176
This commit is contained in:
Karan Takalkar
2020-08-05 17:04:59 +05:30
committed by GitHub
parent eefb325bdd
commit 8a783a3394
10 changed files with 362 additions and 6 deletions
+22 -2
View File
@@ -682,11 +682,31 @@ export class OrganizationService {
* @returns {Observable<any>} Imports data.
*/
getImports(entity: string): Observable<any> {
const httpParams = new HttpParams()
.set('entityType', entity);
const httpParams = new HttpParams().set('entityType', entity);
return this.http.get('/imports', { params: httpParams } );
}
/**
* @returns {Observable<any>}
*/
getStandingInstructionTemplate(): Observable<any> {
return this.http.get('/standinginstructions/template');
}
/**
* @param {any} instruction
* @returns {Observable<any>} Standing Instructions
*/
getStandingInstructions(instruction: any): Observable<any> {
let httpParams = new HttpParams();
for (const key in instruction) {
if (instruction[key] !== '' && instruction[key] !== null) {
httpParams = httpParams.set(key, instruction[key]);
}
}
return this.http.get(`/standinginstructionrunhistory`, { params: httpParams });
}
/**
* @param urlSuffix of Bulk-Import
* @param officeId Office ID for template retrieval