Add selecttemporalitemssuccess

This commit is contained in:
Willem Dantuma
2020-02-27 17:59:00 +01:00
parent 3094170cc2
commit 8e29e479de
3 changed files with 26 additions and 1 deletions

View File

@@ -172,6 +172,20 @@ export class MapEffects {
}
));
@Effect()
selectItemSuccessTemporal$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SELECTITEMSUCCESS),
switchMap((action:mapActions.SelectItemSuccess) => {
if(action.item.itemType == "vnd.farmmaps.itemtype.temporal") {
return this.itemService$.getChildItemList(action.item.code,null).pipe(
map((items) => new mapActions.SelectTemporalItemsSuccess(items )),
catchError(error => of(new commonActions.Fail(error))));
} else {
return [];
}
}
));
@Effect()
uploadedItemClick$: Observable<Action> = this.actions$.pipe(
ofType(commonActions.UPLOADEDFILECLICK),