From 8ab1611f39da7e783ebd60a4a8ce1a79312277cc Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Thu, 21 Nov 2024 10:47:42 +0100 Subject: [PATCH] AW-6504 Support indexed on retrieving child items --- projects/common/src/fm/services/item.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 1117004..d5ac231 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -116,7 +116,7 @@ export class ItemService { getChildItemList(parentcode: string, itemType?: string, dataFilter?: any, level = 1, deep = true, startDate?: Date, endDate?: Date, skip?: number, take?: number, - exactMatchStartOrEndDate?: boolean, owner?:string): Observable { + exactMatchStartOrEndDate?: boolean, owner?:string, indexed?: boolean): Observable { let params = new HttpParams(); if(itemType != null) { params = params.append("it", itemType); @@ -133,11 +133,13 @@ export class ItemService { if(skip) params = params.append("skip", skip); if(take) params = params.append("take", take); + if(indexed) params = params.append("ind",indexed?"true":"false"); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); } getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any, - startDate?: Date, endDate?: Date, exactMatchStartOrEndDate?: boolean, owner?:string): Observable { + startDate?: Date, endDate?: Date, exactMatchStartOrEndDate?: boolean, owner?:string, + indexed?: boolean): Observable { let params = new HttpParams(); if(itemType != null) { params = params.append("it", itemType); @@ -149,6 +151,7 @@ export class ItemService { if (endDate) params = params.append("eDate", endDate.toISOString()); if(exactMatchStartOrEndDate !== undefined) params = params.append("exactMatchStartOrEndDate", exactMatchStartOrEndDate); if(owner) params = params.append("owner", owner); + if(indexed) params = params.append("ind",indexed?"true":"false"); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children/count`, { params: params }); }