Commit 6a29d080 authored by Michael Koch's avatar Michael Koch
Browse files

These weren't saved somehow.

parent 56adcbb2
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
<script type="text/javascript" src="../node_modules/angular/angular.min.js"></script> <script type="text/javascript" src="../node_modules/angular/angular.min.js"></script>
<script type="text/javascript" src="../node_modules/angular-sanitize/angular-sanitize.min.js"></script> <script type="text/javascript" src="../node_modules/angular-sanitize/angular-sanitize.min.js"></script>
<script type="text/javascript" src="../node_modules/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script> <script type="text/javascript" src="../node_modules/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script>
<script type="text/javascript" src="../node_modules/moment/min/moment.min.js"></script> <script type="text/javascript" src="../node_modules/dayjs/dayjs.min.js"></script>
<script type="text/javascript" src="../node_modules/dayjs/locale/de.js"></script>
<script type="text/javascript" src="../node_modules/@fullcalendar/core/main.min.js"></script> <script type="text/javascript" src="../node_modules/@fullcalendar/core/main.min.js"></script>
<script type="text/javascript" src="../node_modules/@fullcalendar/daygrid/main.min.js"></script> <script type="text/javascript" src="../node_modules/@fullcalendar/daygrid/main.min.js"></script>
<script type="text/javascript" src="../node_modules/@fullcalendar/timegrid/main.min.js"></script> <script type="text/javascript" src="../node_modules/@fullcalendar/timegrid/main.min.js"></script>
......
...@@ -268,14 +268,14 @@ function checkNewReservationForm() { ...@@ -268,14 +268,14 @@ function checkNewReservationForm() {
}; };
} }
if (dayjs($("#new_reservation_from_event").val()).$d >= moment($("#new_reservation_to_event").val())) { if (dayjs($("#new_reservation_from_event").val()) >= dayjs($("#new_reservation_to_event").val())) {
return { return {
'success': false, 'success': false,
'reason': 'from_event_after_to_event' 'reason': 'from_event_after_to_event'
}; };
} }
if (_addDays(dayjs($("#new_reservation_from_event").val())._d, 7) <= moment($("#new_reservation_to_event").val()).$d) { if (_addDays($("#new_reservation_from_event").val(), 7) <= dayjs($("#new_reservation_to_event").val())) {
return { return {
'success': false, 'success': false,
'reason': 'event_longer_than_week' 'reason': 'event_longer_than_week'
...@@ -296,28 +296,28 @@ function checkNewReservationForm() { ...@@ -296,28 +296,28 @@ function checkNewReservationForm() {
}; };
} }
if (moment($("#new_reservation_from_preparation").val())._d >= moment($("#new_reservation_to_preparation").val())._d) { if (dayjs($("#new_reservation_from_preparation").val()) >= dayjs($("#new_reservation_to_preparation").val())) {
return { return {
'success': false, 'success': false,
'reason': 'from_preparation_after_to_preparation' 'reason': 'from_preparation_after_to_preparation'
}; };
} }
if (moment($("#new_reservation_from_preparation").val())._d > moment($("#new_reservation_from_event").val())._d) { if (dayjs($("#new_reservation_from_preparation").val()) > dayjs($("#new_reservation_from_event").val())) {
return { return {
'success': false, 'success': false,
'reason': 'from_preparation_after_from_event' 'reason': 'from_preparation_after_from_event'
}; };
} }
if (moment($("#new_reservation_to_event").val())._d > moment($("#new_reservation_to_preparation").val())._d) { if (dayjs($("#new_reservation_to_event").val()) > dayjs($("#new_reservation_to_preparation").val())) {
return { return {
'success': false, 'success': false,
'reason': 'to_event_after_to_preparation' 'reason': 'to_event_after_to_preparation'
}; };
} }
if (_addDays(moment($("#new_reservation_from_preparation").val())._d, 7) <= moment($("#new_reservation_to_preparation").val())._d) { if (_addDays($("#new_reservation_from_preparation").val(), 7) <= dayjs($("#new_reservation_to_preparation").val())) {
return { return {
'success': false, 'success': false,
'reason': 'preparation_longer_than_week' 'reason': 'preparation_longer_than_week'
...@@ -361,7 +361,7 @@ function limitFrontendDatetimePicker() { ...@@ -361,7 +361,7 @@ function limitFrontendDatetimePicker() {
// from preparation // from preparation
if (_validateDate(fp.val(), 'YYYY-MM-DD HH:mm')) { if (_validateDate(fp.val(), 'YYYY-MM-DD HH:mm')) {
let fp_cur = moment(fp.val()._d); let fp_cur = dayjs(fp.val());
tp_min = fp_cur; tp_min = fp_cur;
tp_max = _addDays(fp_cur, 7); tp_max = _addDays(fp_cur, 7);
...@@ -373,7 +373,7 @@ function limitFrontendDatetimePicker() { ...@@ -373,7 +373,7 @@ function limitFrontendDatetimePicker() {
// to preparation // to preparation
if (_validateDate(tp.val(), 'YYYY-MM-DD HH:mm')) { if (_validateDate(tp.val(), 'YYYY-MM-DD HH:mm')) {
let tp_cur = moment(tp.val()._d); let tp_cur = dayjs(tp.val());
fp_min = _.max([_addDays(tp_cur, -7), tomorrow, fp_min]); fp_min = _.max([_addDays(tp_cur, -7), tomorrow, fp_min]);
fp_max = tp_cur; fp_max = tp_cur;
...@@ -385,7 +385,7 @@ function limitFrontendDatetimePicker() { ...@@ -385,7 +385,7 @@ function limitFrontendDatetimePicker() {
// from event // from event
if (_validateDate(fe.val(), 'YYYY-MM-DD HH:mm')) { if (_validateDate(fe.val(), 'YYYY-MM-DD HH:mm')) {
let fe_cur = moment(fe.val()._d); let fe_cur = dayjs(fe.val());
te_min = _.max([fe_cur, te_min]); te_min = _.max([fe_cur, te_min]);
te_max = te_max === false ? _addDays(fe_cur, 7) : _.min([_addDays(fe_cur, 7), te_max]); te_max = te_max === false ? _addDays(fe_cur, 7) : _.min([_addDays(fe_cur, 7), te_max]);
...@@ -396,7 +396,7 @@ function limitFrontendDatetimePicker() { ...@@ -396,7 +396,7 @@ function limitFrontendDatetimePicker() {
// to event // to event
if (_validateDate(te.val(), 'YYYY-MM-DD HH:mm')) { if (_validateDate(te.val(), 'YYYY-MM-DD HH:mm')) {
let te_cur = moment(te.val()._d); let te_cur = dayjs(te.val());
fe_min = _.max([_addDays(te_cur, -7), tomorrow, fe_min]); fe_min = _.max([_addDays(te_cur, -7), tomorrow, fe_min]);
fe_max = fe_max === false ? te_cur : _.min([te_cur, fe_max]); fe_max = fe_max === false ? te_cur : _.min([te_cur, fe_max]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment