From 8c59976de65e7a0070ec853019aa9df021eff44e Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Mon, 4 Jul 2022 16:19:00 +0200 Subject: [PATCH] AW-3912 added startDate and endDate to the item child list method --- projects/common/src/fm/services/item.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 9f360fe..e62c7eb 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -83,7 +83,8 @@ export class ItemService { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/`, { params: params }); } - getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level: number = 1, deep: boolean = true): Observable { + getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level: number = 1, deep: boolean = true, + startDate?: Date = null, endDate?: Date = null): Observable { var params = new HttpParams(); if(itemType != null) { params = params.append("it", itemType); @@ -93,6 +94,8 @@ export class ItemService { } params = params.append("lvl", level.toString()); params = params.append("deep", deep.toString()); + if (startDate) params = params.append("sDate", startDate.toISOString()); + if (endDate) params = params.append("eDate", endDate.toISOString()); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); }