Bugzilla – Attachment 171394 Details for
Bug 37618
Select patron's, then item's home library by default for pickup location when creating bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37618: (follow-up) Inline single use function containsAny and remove definition
Bug-37618-follow-up-Inline-single-use-function-con.patch (text/plain), 1.75 KB, created by
Paul Derscheid
on 2024-09-12 13:23:14 UTC
(
hide
)
Description:
Bug 37618: (follow-up) Inline single use function containsAny and remove definition
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-09-12 13:23:14 UTC
Size:
1.75 KB
patch
obsolete
>From df23f4b6562c0719c74bf975087483ba4e888c08 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Thu, 12 Sep 2024 15:19:55 +0200 >Subject: [PATCH] Bug 37618: (follow-up) Inline single use function containsAny > and remove definition > >--- > .../intranet-tmpl/prog/js/modals/place_booking.js | 13 +++---------- > 1 file changed, 3 insertions(+), 10 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 bb1a4ccc19..683aa67a7b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >@@ -8,15 +8,6 @@ let bookable_items, > booking_patron, > booking_itemtype_id; > >-/** >- * @param {number[]} integers1 - The first array of integers to check. >- * @param {number[]} integers2 - The second array of integers to be checked against. >- * @returns {boolean} - Returns true if any element from integers1 is found in integers2, otherwise false. >- */ >-function containsAny(integers1, integers2) { >- return integers1.some(integer => new Set(integers2).has(integer)); >-} >- > $("#placeBookingModal").on("show.bs.modal", function (e) { > // Get context > let button = $(e.relatedTarget); >@@ -173,7 +164,9 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > $pickupSelect.empty(); > > const filtered_pickup_locations = response.filter(({ pickup_items }) => >- containsAny(pickup_items, bookableItemnumbers) >+ pickup_items.some(pickup_item => >+ new Set(bookableItemnumbers).has(pickup_item) >+ ) > ); > $.each(filtered_pickup_locations, function (index, pickup_location) { > let option = $( >-- >2.46.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37618
:
170235
|
171384
|
171394
|
171395
|
173155
|
173156
|
173157
|
176924