This commit is contained in:
frederikpyt 2020-08-04 16:35:38 +02:00
parent 50d8079da2
commit 5aa1995cb8
1 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@
header.appendChild(headerDay); header.appendChild(headerDay);
let date = moment().locale("da").day(weekDay).week(week); let date = moment().locale("da").day(weekDay).week(week);
var datetext = moment().locale("da").day(weekDay).week(week).year() + "-" + prependZero(moment().locale("da").day(weekDay).week(week).date()) + "-" + prependZero(moment().locale("da").day(weekDay).week(week).month()); var datetext = moment().locale("da").day(weekDay).week(week).year() + "-" + prependZero(moment().locale("da").day(weekDay).week(week).month()) + "-" + prependZero(moment().locale("da").day(weekDay).week(week).date());
let dayHolder = document.createElement("div"); let dayHolder = document.createElement("div");
dayHolder.classList.add("calendar-table__col"); dayHolder.classList.add("calendar-table__col");
@ -93,7 +93,7 @@
} }
function onDateSelect(date, dayHolder, datetext) { function onDateSelect(date, dayHolder, datetext) {
//console.log("Opdaterer selects"); console.log("Opdaterer selects");
let events; let events;
let machinez; let machinez;
let buttonz; let buttonz;
@ -121,7 +121,7 @@
url: '{{ route("washing-reservations.api") }}', url: '{{ route("washing-reservations.api") }}',
params: { 'date': date, 'machine_id': machine_id, 'datetext': datetext } params: { 'date': date, 'machine_id': machine_id, 'datetext': datetext }
}).then(function (response) { }).then(function (response) {
//console.log(response.data["unavailable_times"]); console.log(response.data["unavailable_times"]);
var data = response.data; var data = response.data;
if(document.getElementById("washing-machines") != undefined) if(document.getElementById("washing-machines") != undefined)
@ -209,7 +209,7 @@
let unavailable_times = data["unavailable_times"]; let unavailable_times = data["unavailable_times"];
unavailable_times.forEach(function (item, index) { unavailable_times.forEach(function (item, index) {
//console.log(item); console.log(item);
document.getElementById(item).remove(); document.getElementById(item).remove();
}); });