Fix date parsing for lists
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2019-11-12 16:27:08 +01:00
parent 7476e4c928
commit f31e4154b2

View File

@ -75,7 +75,7 @@ export class ItemService {
params = params.append("df", JSON.stringify(dataFilter)); params = params.append("df", JSON.stringify(dataFilter));
} }
params = params.append("lvl", level.toString()); params = params.append("lvl", level.toString());
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); return this.httpClient.get<IItem[]>(`${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<IItem[]> { getChildItemListByExtent(parentcode: string, itemType: string, extent: number[], crs: string, dataFilter?: any, level: number = 1): Observable<IItem[]> {
@ -87,7 +87,7 @@ export class ItemService {
params = params.append("df", JSON.stringify(dataFilter)); params = params.append("df", JSON.stringify(dataFilter));
} }
params = params.append("lvl", level.toString()); params = params.append("lvl", level.toString());
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params }); return this.httpClient.get<IItem[]>(`${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<any> { getItemFeatures(code: string, extent: number[], crs: string, layerIndex?:number): Observable<any> {