From 8cd7b85de2746fab37f8329b37d4c9736bdf4935 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Tue, 12 Nov 2024 08:56:50 +0100 Subject: [PATCH] AW-6466 Overrule exact matching on data start/end date with from/until behavior --- projects/common/src/fm/services/item.service.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 6563803..692ee07 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -114,7 +114,8 @@ export class ItemService { } getChildItemList(parentcode: string, itemType?: string, dataFilter?: any, level = 1, deep = true, - startDate?: Date, endDate?: Date, skip?: number, take?: number): Observable { + startDate?: Date, endDate?: Date, skip?: number, take?: number, + exactMatchStartOrEndDate?: boolean): Observable { let params = new HttpParams(); if(itemType != null) { params = params.append("it", itemType); @@ -126,13 +127,15 @@ export class ItemService { params = params.append("deep", deep.toString()); if (startDate) params = params.append("sDate", startDate.toISOString()); if (endDate) params = params.append("eDate", endDate.toISOString()); - + if(exactMatchStartOrEndDate) params = params.append("exactMatchStartOrEndDate", exactMatchStartOrEndDate); + if(skip) params = params.append("skip", skip); if(take) params = params.append("take", take); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); } - getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any, startDate?: Date, endDate?: Date): Observable { + getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any, + startDate?: Date, endDate?: Date, exactMatchStartOrEndDate?: boolean): Observable { let params = new HttpParams(); if(itemType != null) { params = params.append("it", itemType); @@ -142,6 +145,7 @@ export class ItemService { } if (startDate) params = params.append("sDate", startDate.toISOString()); if (endDate) params = params.append("eDate", endDate.toISOString()); + if(exactMatchStartOrEndDate) params = params.append("exactMatchStartOrEndDate", exactMatchStartOrEndDate); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children/count`, { params: params }); }