|
Lines 211-217
$("#placeBookingModal").on("show.bs.modal", function (e) {
Link Here
|
| 211 |
|
211 |
|
| 212 |
$pickupSelect.prop("disabled", false); |
212 |
$pickupSelect.prop("disabled", false); |
| 213 |
|
213 |
|
| 214 |
// If filtered_pickup_locations contain the booking_patron's home library, use it as the default for pickup_library_id |
214 |
/* If there are no filtered_pickup_locations, clear the picker |
|
|
215 |
* and return early without trying to set a default. */ |
| 216 |
if (!filtered_pickup_locations.length && !pickup_library_id) { |
| 217 |
$pickupSelect.val(null).trigger("change"); |
| 218 |
return; |
| 219 |
} |
| 220 |
|
| 221 |
/* If filtered_pickup_locations contain the booking_patron's home library, |
| 222 |
* use it as the default for pickup_library_id. */ |
| 215 |
pickup_library_id ??= filtered_pickup_locations.find( |
223 |
pickup_library_id ??= filtered_pickup_locations.find( |
| 216 |
pickup_location => |
224 |
pickup_location => |
| 217 |
pickup_location.library_id === |
225 |
pickup_location.library_id === |
| 218 |
- |
|
|