Improved implementation to retrieve user packages.
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Peter Bastiani 2020-08-05 09:02:28 +02:00
parent ee7d1cb9a2
commit 514a91c2c7
1 changed files with 2 additions and 3 deletions

View File

@ -62,9 +62,8 @@ export class AppCommonEffects {
@Effect()
initUserPackages$:Observable<Action> = 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)))
)