From f31e4154b29e0d2bf40257cda2fd6c8d01d2d068 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Tue, 12 Nov 2019 16:27:08 +0100 Subject: [PATCH] Fix date parsing for lists --- projects/common/src/fm/services/item.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 1024d4e..b6dded9 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -75,7 +75,7 @@ export class ItemService { params = params.append("df", JSON.stringify(dataFilter)); } params = params.append("lvl", level.toString()); - return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); + return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i)))); } getChildItemListByExtent(parentcode: string, itemType: string, extent: number[], crs: string, dataFilter?: any, level: number = 1): Observable { @@ -87,7 +87,7 @@ export class ItemService { params = params.append("df", JSON.stringify(dataFilter)); } params = params.append("lvl", level.toString()); - return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); + return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }).pipe(map(ia => ia.map(i => this.parseDates(i)))); } getItemFeatures(code: string, extent: number[], crs: string, layerIndex?:number): Observable {