diff --git a/skolehjem/resources/views/app/washing-reservations/create.blade.php b/skolehjem/resources/views/app/washing-reservations/create.blade.php index f7aa6fe..1b60af7 100644 --- a/skolehjem/resources/views/app/washing-reservations/create.blade.php +++ b/skolehjem/resources/views/app/washing-reservations/create.blade.php @@ -174,11 +174,7 @@ //Fill locations fillLocations(data["locations"], location_id); - //Fill washing-machines - fillMachines(data["washingmachines"], machine_id); - - //Fill events (times) and remove unavailable_times - fillTimes(data["unavailable_times"], datetext, date); + updateForm(); }); } @@ -361,7 +357,7 @@ //Update selects function updateForm() { - //console.log("Updating form..."); + console.log("Updating form..."); var location_id; var machine_id; @@ -372,7 +368,7 @@ else location_id = 0; - //console.log("location_id: " + location_id); + console.log("location_id: " + location_id); //If a washing-machine select exists, set machine_id to its currently selected options value //Else set it to 0 @@ -399,7 +395,7 @@ else machine_id = 0; - //console.log("machine_id: " + machine_id); + console.log("machine_id: " + machine_id); axios({ method: 'get', @@ -410,7 +406,7 @@ var data = response.data; //Fill events (times) and remove unavailable_times - fillTimes(data["unavailable_times"], dateText); + fillTimes(data["unavailable_times"], dateText, momentDate); }); }); }