Display last

This commit is contained in:
Willem Dantuma
2020-02-27 21:41:52 +01:00
parent 8e29e479de
commit 47f77c2819
5 changed files with 27 additions and 10 deletions

View File

@@ -178,6 +178,7 @@ export class MapEffects {
switchMap((action:mapActions.SelectItemSuccess) => {
if(action.item.itemType == "vnd.farmmaps.itemtype.temporal") {
return this.itemService$.getChildItemList(action.item.code,null).pipe(
map(items => items.sort((a, b) => b.dataDate.getTime() - a.dataDate.getTime())),
map((items) => new mapActions.SelectTemporalItemsSuccess(items )),
catchError(error => of(new commonActions.Fail(error))));
} else {