diff client/src/store/imports.js @ 2789:c1e832f77726

import_overview: setting a sane default window in case of reload When the overview is initially opened the default window is start: begin of current hour end: end of current hour depending on interval size the window is widened to e.g. begin and end of day. When a reload is triggered, the reload puts "now" within the selected window when the window was 'hour' it uses start: begin of current hour end: end of current hour which should behave consistent.
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 25 Mar 2019 11:03:23 +0100
parents 7badd99c9315
children c40540889b53
line wrap: on
line diff
--- a/client/src/store/imports.js	Mon Mar 25 10:38:37 2019 +0100
+++ b/client/src/store/imports.js	Mon Mar 25 11:03:23 2019 +0100
@@ -15,7 +15,7 @@
 import { HTTP } from "@/lib/http";
 import { WFS } from "ol/format.js";
 import { equalTo as equalToFilter } from "ol/format/filter.js";
-import { startOfHour } from "date-fns";
+import { startOfHour, endOfHour } from "date-fns";
 
 /* eslint-disable no-unused-vars */
 /* eslint-disable no-unreachable */
@@ -43,7 +43,7 @@
     showLogs: NODETAILS,
     details: [],
     startDate: startOfHour(new Date()),
-    endDate: new Date(),
+    endDate: endOfHour(new Date()),
     prev: null,
     next: null
   };