From e5e04f2588680a25d80ed6db61e0e963cc950dda Mon Sep 17 00:00:00 2001 From: Lars Glandorf Date: Thu, 13 Aug 2026 07:50:22 +0200 Subject: [PATCH] bug(docs),fix(reservation): API details, Check all Reservations bug(docs): Correct the API endpoint of Resources fix(reservation): Check against all reservations of available resources. style(reservation) to not available resources will be line-through Closes: #1614 Assisted-by: gpt-5.4:mini, claude:4.5-haiku --- Web/css/librebooking.css | 5 +++++ Web/scripts/reservation.js | 10 ++-------- docs/source/API.rst | 12 ++++++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Web/css/librebooking.css b/Web/css/librebooking.css index b24eed65b2..9a86ac16fb 100644 --- a/Web/css/librebooking.css +++ b/Web/css/librebooking.css @@ -777,3 +777,8 @@ a.fc-event:hover { .fc-timegrid-event-harness > .fc-timegrid-event { inset: 0 -4px 0 0; } + +.unavailableResource { + text-decoration: line-through; + opacity: 0.5; +} diff --git a/Web/scripts/reservation.js b/Web/scripts/reservation.js index 49d7702202..13913a4867 100644 --- a/Web/scripts/reservation.js +++ b/Web/scripts/reservation.js @@ -549,19 +549,13 @@ function Reservation(opts) { elements.groupDiv.find(':not([resource-id])').attr('checked', false).attr('disabled', true); } - if (allCheckboxes.length > 50) { - dialog.find('#checking-availability-error').removeClass('no-show'); - dialog.find('#checking-availability').addClass('no-show'); - return; - } - dialog.find('#checking-availability').removeClass('no-show'); ajaxGet(url, null, function (data) { $.each(data, function (i, unavailableResourceId) { var checkbox = dialog.find('[resource-id="' + unavailableResourceId + '"]'); checkbox.prop('checked', false); - checkbox.trigger('checked'); + //checkbox.trigger('checked'); checkbox.prop('disabled', true); checkbox.parent().addClass('unavailableResource'); }); @@ -575,7 +569,7 @@ function Reservation(opts) { if (opts.maximumResources && elements.groupDiv.find(':checked').length >= opts.maximumResources) { elements.groupDiv.find(':not(:checked)').attr('disabled', true); } else { - elements.groupDiv.find('[resource-id]').attr('disabled', false); + //elements.groupDiv.find('[resource-id]').attr('disabled', false); } if (!checkbox[0].hasAttribute('resource-id')) { diff --git a/docs/source/API.rst b/docs/source/API.rst index 56aeb71644..3a3acb4ece 100644 --- a/docs/source/API.rst +++ b/docs/source/API.rst @@ -1975,8 +1975,10 @@ Creates a new resource "requiresApproval": true, "allowMultiday": true, "maxParticipants": 100, - "minNotice": "86400", - "maxNotice": "0d12h30m", + "minNoticeAdd": "86400", + "minNoticeUpdate": "0d12h30m", + "minNoticeDelete": 0, + "bufferTime": 0, "description": "description", "scheduleId": 10, "autoAssignPermissions": true, @@ -2060,8 +2062,10 @@ Updates an existing resource "requiresApproval": true, "allowMultiday": true, "maxParticipants": 100, - "minNotice": "86400", - "maxNotice": "0d12h30m", + "minNoticeAdd": "86400", + "minNoticeUpdate": "0d12h30m", + "minNoticeDelete": 0, + "bufferTime": 0, "description": "description", "scheduleId": 10, "autoAssignPermissions": true,