Bugzilla – Attachment 145368 Details for
Bug 32653
Curbside pickups - wrong dates available at the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32653: Fix curbside pickup if configured on more than 1 branch
Bug-32653-Fix-curbside-pickup-if-configured-on-mor.patch (text/plain), 2.20 KB, created by
David Nind
on 2023-01-17 18:56:43 UTC
(
hide
)
Description:
Bug 32653: Fix curbside pickup if configured on more than 1 branch
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-01-17 18:56:43 UTC
Size:
2.20 KB
patch
obsolete
>From 139d15c79c35f49be3850241a387412a609347ba Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Jan 2023 17:25:39 +0100 >Subject: [PATCH] Bug 32653: Fix curbside pickup if configured on more than 1 > branch > >If curbside pickup is configured on more than 1 branch, the calendar >will not display the correct day. > >We are always selecting the days for the last branch. > >Test plan: >Configure curbside pickup for >CPL Monday 8:12 >FPL Tuesday 12:15 > >Login at the opac, select CPL, notice Tuesday are available > >Apply the patch and confirm all is working correctly now. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../bootstrap/en/modules/opac-curbside-pickups.tt | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >index c24d1255ba..828f7b2c49 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >@@ -331,6 +331,8 @@ > } > }); > >+ const pickupDate_fp = document.getElementById("pickup-date")._flatpickr; >+ > $('#pickup-branch').on('change', function() { > let branchcode = $(this).val(); > >@@ -348,12 +350,13 @@ > $('#existing-pickup-warning').hide(); > $("#pickup-date,#pickup_date_item").show(); > } >+ >+ pickupDate_fp.set('disable', [function(date) { >+ return !policies[branchcode].slots_per_day.hasOwnProperty(date.getDay()); >+ }]); >+ > }); > >- const pickupDate_fp = document.getElementById("pickup-date")._flatpickr; >- pickupDate_fp.set('disable', [function(date) { >- return !slots_per_day.hasOwnProperty(date.getDay()); >- }]); > pickupDate_fp.config.onClose.push(function( selectedDates, dateStr, instance ){ > /* Here we add an onClose event to the existing flatpickr instance */ > /* It fires after the user has selected a date from the calendar popup */ >-- >2.30.2
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 32653
:
145362
|
145368
|
147025