From 4ab1e43d40887a9767561ccbc493587bef1d8f61 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Thu, 29 Aug 2024 09:37:03 +0200 Subject: [PATCH] Aw-6020 Fix getChildItemListCount --- projects/common/src/fm/effects/app-common.effects.ts | 2 +- projects/common/src/fm/services/item.service.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index 36e91ef..d2570ec 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -148,7 +148,7 @@ export class AppCommonEffects { ofType(appCommonActions.VIEWITEM), withLatestFrom(this.store$.select(appCommonReducers.selectGetItemTypes)), switchMap(([action, itemtypes]) => { - const a = action as appCommonActions.EditItem; + const a = action as appCommonActions.ViewItem; const itemType = itemtypes[a.item.itemType]; const viewer = itemType.viewer; const editor = itemType.editor; diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 601b4c8..970727b 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -115,7 +115,9 @@ export class ItemService { getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any): Observable { let params = new HttpParams(); - params = params.append("it", itemType); + if(itemType != null) { + params = params.append("it", itemType); + } if (dataFilter != null) { params = params.append("df", JSON.stringify(dataFilter)); }