From 01933b16022075cc7825be05407ab563a7f17a05 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Tue, 23 Jun 2020 13:36:03 +0200 Subject: [PATCH] AW-1330 add atitemlocationitem parameter --- projects/common/src/fm/services/item.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 8d1185c..7ea5ff2 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -65,13 +65,13 @@ export class ItemService { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`); } - getItemList(itemType: string, dataFilter?: any, level: number = 1): Observable { + getItemList(itemType?: string, dataFilter?: any, level?:number ,atItemLocationItemCode?:string,indexed?:boolean): Observable { var params = new HttpParams(); - params = params.append("it", itemType); - if(dataFilter != null){ - params = params.append("df", JSON.stringify(dataFilter)); - } - params = params.append("lvl", itemType); + if(itemType) params = params.append("it", itemType); + if(dataFilter) params = params.append("df", JSON.stringify(dataFilter)); + if(atItemLocationItemCode) params = params.append("ail",atItemLocationItemCode); + if(indexed) params = params.append("ind",indexed?"true":"false"); + if(level) params = params.append("lvl", level.toFixed()); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i)))); }