Fixed some issue

This commit is contained in:
Willem Dantuma
2020-03-03 10:21:24 +01:00
parent 5343a4aa98
commit a8f82f800f
4 changed files with 36 additions and 11 deletions

View File

@@ -178,8 +178,11 @@ 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 )),
map(items => new mapActions.SelectTemporalItemsSuccess(
items.sort((a, b) =>
-(b.dataDate.getTime() - a.dataDate.getTime())
)
)),
catchError(error => of(new commonActions.Fail(error))));
} else {
return [];