Skip to content
Snippets Groups Projects
Commit b966fda6 authored by Brita Linnestad's avatar Brita Linnestad
Browse files

fix: Store startdate but not enddate

parent 941aa9ea
No related branches found
No related tags found
1 merge request!23fix: Store startdate but not enddate
...@@ -82,7 +82,6 @@ ...@@ -82,7 +82,6 @@
}); });
storeLocalSettings(userSettings); storeLocalSettings(userSettings);
console.info("Store current user settings", userSettings);
} }
...@@ -92,15 +91,15 @@ ...@@ -92,15 +91,15 @@
const inputLatitudeElement = document.getElementById("latitude"); const inputLatitudeElement = document.getElementById("latitude");
const inputLongitudeElement = document.getElementById("longitude"); const inputLongitudeElement = document.getElementById("longitude");
const userSettingsFields = ["latitude","longitude","timezone","weatherStationId"]; const userSettingsFields = ["latitude","longitude","timezone","weatherStationId","startdate"];
const userSettingsRadios = ["weatherdataType","radioDays"]; const userSettingsRadios = ["weatherdataType","radioDays"];
let poiIdList = [] let poiIdList = []
let selectedPoint = null; let selectedPoint = null;
let selectedFeature = undefined; let selectedFeature = undefined;
let startDate; //let startDate;
let endDate; //let endDate;
function selectCoordinates(coordinatesData) { function selectCoordinates(coordinatesData) {
const selectedLatitude = coordinatesData ? coordinatesData.latitude : undefined; const selectedLatitude = coordinatesData ? coordinatesData.latitude : undefined;
...@@ -116,7 +115,6 @@ ...@@ -116,7 +115,6 @@
window.loadUserSettings = () => { window.loadUserSettings = () => {
let userSettings = getLocalSettings(getNameSpaced("{{ form_id }}",userSettingsFields.concat(userSettingsRadios)), false); let userSettings = getLocalSettings(getNameSpaced("{{ form_id }}",userSettingsFields.concat(userSettingsRadios)), false);
console.info("User settings available when page is loaded", userSettings)
// Settings found, render form and run model // Settings found, render form and run model
if(Object.keys(userSettings).length > 0) if(Object.keys(userSettings).length > 0)
...@@ -144,8 +142,8 @@ ...@@ -144,8 +142,8 @@
} }
window.onload = async(event) => { window.onload = async(event) => {
startDate = document.getElementById("startdate"); //startDate = document.getElementById("startdate");
endDate = document.getElementById("endDate"); //endDate = document.getElementById("endDate");
await applefruitMoth.renderWeatherstations(); await applefruitMoth.renderWeatherstations();
loadUserSettings() loadUserSettings()
runModel(); runModel();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment