Mercurial > gemma
changeset 5289:002e57f99dc9
Client: add time filters to bottlnecks request for soundingresults import
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Tue, 07 Jul 2020 10:04:29 +0200 |
parents | 48bef30cdb72 |
children | da3fd4c3d1b5 |
files | client/src/store/bottlenecks.js |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/bottlenecks.js Fri Jul 03 15:37:42 2020 +0200 +++ b/client/src/store/bottlenecks.js Tue Jul 07 10:04:29 2020 +0200 @@ -15,6 +15,11 @@ import { HTTP } from "@/lib/http"; import { WFS } from "ol/format"; import { displayError } from "@/lib/errors"; +import { + and as andFilter, + greaterThanOrEqualTo, + lessThanOrEqualTo +} from "ol/format/filter"; // initial state const init = () => { @@ -184,7 +189,11 @@ "responsible_country", "limiting", "reference_water_levels" - ] + ], + filter: andFilter( + lessThanOrEqualTo("valid_from", new Date().toISOString()), + greaterThanOrEqualTo("valid_to", new Date().toISOString()) + ) }); HTTP.post( "/internal/wfs",