Bug 32788: Order curbside pickup slots chronologically
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / curbside_pickups.tt
index ad3edb5..cd79451 100644 (file)
                     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>");