# HG changeset patch # User Sascha Wilde # Date 1564662144 -7200 # Node ID 209bdd361615115e3373e84d5481af3bcc7c32d0 # Parent b785b6bef578bccd512f60f8604afb2d6addef6b# Parent 9f03eb3817d6330854d554f373b672850f47f183 Merged v4-preview20190726-fixes diff -r b785b6bef578 -r 209bdd361615 client/src/store/fairwayavailability.js --- 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") } })