From 514a91c2c7b905d4941746b5d00423b2dfeb1780 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Wed, 5 Aug 2020 09:02:28 +0200 Subject: [PATCH] Improved implementation to retrieve user packages. --- projects/common/src/fm/effects/app-common.effects.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index 38e97d9..3739f9f 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -62,9 +62,8 @@ export class AppCommonEffects { @Effect() initUserPackages$:Observable = this.actions$.pipe( ofType(appCommonActions.INITUSERPACKAGES), - withLatestFrom(this.store$.select(appCommonReducers.SelectGetUser)), - switchMap(([action,user]) => { - return this.itemService$.getChildItemList(user.code+":USER_PACKAGES","vnd.farmmaps.itemtype.package").pipe( + switchMap(() => { + return this.itemService$.getItemList('vnd.farmmaps.itemtype.package').pipe( switchMap((items) => of(new appCommonActions.InitUserPackagesSuccess(items))), catchError(error => of(new appCommonActions.Fail(error))) )