From 35049907084e6296f87df39e635121a7dec445b8 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Fri, 30 Apr 2021 10:36:58 +0200 Subject: [PATCH] Add ability to retrieve only items that are valid today. --- projects/common/src/fm/services/item.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 8f643e0..d8fc9b0 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -71,13 +71,14 @@ export class ItemService { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`); } - getItemList(itemType?: string, dataFilter?: any, level?:number ,atItemLocationItemCode?:string,indexed?:boolean): Observable { + getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, indexed?: boolean, validToday?: boolean): Observable { var params = new HttpParams(); 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()); + if (level) params = params.append("lvl", level.toFixed()); + if (validToday) params = params.append("vt", indexed ? "true" : "false"); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/`, { params: params }); }