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 <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-06-21 12:25:24 +01:00 committed by Katrin Fischer
parent 083330d5c5
commit 093597902f
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 7 additions and 6 deletions

View File

@ -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);