Mercurial > gemma
changeset 4123:209bdd361615
Merged v4-preview20190726-fixes
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 01 Aug 2019 14:22:24 +0200 |
parents | b785b6bef578 (current diff) 9f03eb3817d6 (diff) |
children | acd87a3d246b |
files | |
diffstat | 1 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/fairwayavailability.js Wed Jul 31 18:33:49 2019 +0200 +++ b/client/src/store/fairwayavailability.js Thu Aug 01 14:22:24 2019 +0200 @@ -18,9 +18,7 @@ import { format, subYears, - startOfDay, startOfMonth, - endOfDay, endOfMonth, startOfYear, endOfYear, @@ -240,13 +238,11 @@ } else if (type == TYPES.SECTION || type == TYPES.STRETCH) { additionalParams = `&depthbreaks=${depthLimit1},${depthLimit2}&widthbreaks=${widthLimit1},${widthLimit2}`; } + const start = encodeURIComponent("00:00:00+00:00"); + const end = encodeURIComponent("23:59:59+00:00"); const URL = `data/${endpoint}/fairway-depth/${encodeURIComponent( name - )}?from=${encodeURIComponent( - format(startOfDay(from), "YYYY-MM-DDTHH:mm:ssZ") - )}&to=${encodeURIComponent( - format(endOfDay(to), "YYYY-MM-DDTHH:mm:ssZ") - )}&mode=${frequency}&los=${LOS}${additionalParams}`; + )}?from=${from}T${start}&to=${to}T${end}&mode=${frequency}&los=${LOS}${additionalParams}`; HTTP.get(URL, { headers: { "X-Gemma-Auth": localStorage.getItem("token") } }) @@ -282,6 +278,8 @@ ? feature.properties.name : feature.get("objnam"); [from, to] = getIntervallBorders(from, to, frequency); + const start = encodeURIComponent("00:00:00+00:00"); + const end = encodeURIComponent("23:59:59+00:00"); let additionalParams = ""; let endpoint = type || TYPES.BOTTLENECK; if (type === TYPES.BOTTLENECK) { @@ -294,11 +292,7 @@ } const URL = `data/${endpoint}/availability/${encodeURIComponent( name - )}?from=${encodeURIComponent( - format(startOfDay(from), "YYYY-MM-DDTHH:mm:ssZ") - )}&to=${encodeURIComponent( - format(endOfDay(to), "YYYY-MM-DDTHH:mm:ssZ") - )}&mode=${frequency}&los=${LOS}${additionalParams}`; + )}?from=${from}T${start}&to=${to}T${end}&mode=${frequency}&los=${LOS}${additionalParams}`; HTTP.get(URL, { headers: { "X-Gemma-Auth": localStorage.getItem("token") } })