From 9c103a0c40bd33c0f27453efe6bf67595a597009 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Tue, 25 Feb 2020 15:04:12 +0100 Subject: [PATCH] AW-942 Add (optional) deep parameter to getChildItemList. --- projects/common/src/fm/services/item.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 62a5c50..51c376d 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -75,13 +75,14 @@ export class ItemService { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i)))); } - getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level: number = 1): Observable { + getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level: number = 1, deep: boolean = true): Observable { var params = new HttpParams(); params = params.append("it", itemType); if (dataFilter != null) { params = params.append("df", JSON.stringify(dataFilter)); } params = params.append("lvl", level.toString()); + params = params.append("deep", deep.toString()); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i)))); }