From 093597902f80f2d03fe61de046db8f0eee86e8a9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 21 Jun 2024 12:25:24 +0100 Subject: [PATCH] Bug 34440: Update for change to /circulation_rules We updated the preceeding bug that introducing the /circulation_rules endpoint such that it always returns an array. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Kristi Krueger Signed-off-by: Martin Renvoize Signed-off-by: Paul Derscheid Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/js/modals/place_booking.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js index 4408fb3d2e..c9e143d72d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js @@ -140,14 +140,15 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { type: "GET", dataType: "json", data: { - category: booking_patron.category_id, - itemtype: booking_itemtype_id, - branchcode: pickup_library_id, - rules: [ 'bookings_lead_period', 'bookings_trail_period' ] + patron_category_id: booking_patron.category_id, + item_type_id: booking_itemtype_id, + library_id: pickup_library_id, + rules: 'bookings_lead_period,bookings_trail_period' }, success: function (response) { - leadDays = response.bookings_lead_period; - trailDays = response.bookings_trail_period; + let rules = response[0] + leadDays = rules.bookings_lead_period; + trailDays = rules.bookings_trail_period; }, error: function (xhr, status, error) { console.log("Circulation rules fetch failed: ", error); -- 2.39.5