Bugzilla – Attachment 146327 Details for
Bug 32788
Curbside pickups - Order curbside pickup slots chronologically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32788: Order curbside pickup slots chronologically
Bug-32788-Order-curbside-pickup-slots-chronologica.patch (text/plain), 3.42 KB, created by
Martin Renvoize (ashimema)
on 2023-02-07 13:22:45 UTC
(
hide
)
Description:
Bug 32788: Order curbside pickup slots chronologically
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-02-07 13:22:45 UTC
Size:
3.42 KB
patch
obsolete
>From 562cf1c7c1b7dee868bc204325b2d5ed4f53fe59 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Feb 2023 17:03:32 +0100 >Subject: [PATCH] Bug 32788: Order curbside pickup slots chronologically > >We need to order the slots chronologically, not depending on when they >have been added. > >Test plan: >Create a slot 13 to 17 the another one 8 to 12 >We want to display 8 to 12 before 13 to 17. >Confirm that this patch fixes that on the 3 following views: >Curbside pickups admin >Curbside pickups staff side >Curbside pickups at the OPAC > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt | 2 +- > .../intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt >index f4597d88bac..e3583e105b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt >@@ -234,7 +234,7 @@ > .filter(d => d in slots_per_day) > .map( day => { > let li_node = $('<li><label>'+get_day_lib(day)+'<label></li>'); >- slots_per_day[day].forEach(function(slot) { >+ slots_per_day[day].sort().forEach(function(slot) { > let span_node = $('<span class="pickup-slot"></span>'); > span_node.append('<input type="hidden" name="pickup-slot-'+branchcode+'" value="'+slot+'"/>'); > span_node.append('<span>'+format_slot(slot)+'</span>'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt >index ad3edb5aaf1..cd79451dc8d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt >@@ -562,7 +562,7 @@ > return; > } > >- slots_per_day[dow].forEach(function(slot){ >+ slots_per_day[dow].sort((a, b) => a.start_hour - b.start_hour).forEach(function(slot){ > let pickup_interval = policy.pickup_interval; > if (!pickup_interval) { > $('#pickup-times').html("<div>"+_("No pickup time defined for this day.")+"</div>"); >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 c24d1255ba2..d4685e35f5b 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 >@@ -374,7 +374,7 @@ > return; > } > >- policy.slots_per_day[dow].forEach(function(slot){ >+ policy.slots_per_day[dow].sort((a, b) => a.start_hour - b.start_hour).forEach(function(slot){ > let pickup_interval = policy.pickup_interval; > if (!pickup_interval) { > $('#pickup-times').html("<div>"+_("No pickup time defined for this day.")+"</div>"); >-- >2.39.1
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 32788
:
146285
|
146291
| 146327