Add fmPackageExists directive
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma
2022-03-16 14:20:28 +01:00
parent 521b882798
commit 713af307cd
7 changed files with 59 additions and 3 deletions

View File

@@ -62,6 +62,15 @@ export class AppCommonEffects {
)
})
));
initPackages$ = createEffect(() => this.actions$.pipe(
ofType(appCommonActions.INITPACKAGES),
switchMap(() => {
return this.itemService$.getItemList('vnd.farmmaps.itemtype.package.template').pipe(
switchMap((items) => of(new appCommonActions.InitPackagesSuccess(items))),
catchError(error => of(new appCommonActions.Fail(error)))
)
})
));
userPackagesChanged$ = createEffect(() => this.actions$.pipe(
ofType(appCommonActions.ITEMCHANGEDEVENT),
@@ -99,7 +108,7 @@ export class AppCommonEffects {
initUserSuccess$ = createEffect(() => this.actions$.pipe(
ofType(appCommonActions.INITUSERSUCCESS),
switchMap(() => {
return [new appCommonActions.InitRoot(),new appCommonActions.InitUserPackages(),new appCommonActions.InitUserSettingsRoot()];
return [new appCommonActions.InitRoot(),new appCommonActions.InitUserPackages(),new appCommonActions.InitPackages(),new appCommonActions.InitUserSettingsRoot()];
}
)));