Bug 41568: Tidy kohaTable - circ/curbside_pickups.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-01-08 12:01:11 +01:00 committed by Lucas Gass
parent 323833364d
commit 751b89ebaf
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 14 additions and 10 deletions

View File

@ -472,7 +472,19 @@
<script>
let pickups = [% To.json(curbside_pickups.unblessed) | $raw %];
let policy = [% To.json(policy.unblessed) | $raw %];
let opening_slots = [% To.json(policy.opening_slots.unblessed) | $raw %];
let dt_settings = [];
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'to_be_stagedt', 'json') | $raw %] );
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'staged_and_readyt', 'json') | $raw %] );
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'patron_is_outsidet', 'json') | $raw %] );
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'delivered_todayt', 'json') | $raw %] );
const tab = "[% tab | html %]";
</script>
<script>
let existingPickupMoments = [];
pickups.forEach(function(pickup){
let scheduled_pickup_datetime = pickup.scheduled_pickup_datetime;
@ -481,7 +493,6 @@
existingPickupMoments.push(pickupMoment);
});
let opening_slots = [% To.json(policy.opening_slots.unblessed) | $raw %];
let slots_per_day = {};
opening_slots.forEach(function(slot){
let day = slot.day;
@ -495,9 +506,9 @@
$('#find-patron').focus();
});
[% IF tab == 'schedule-pickup_panel' %]
if (tab == 'schedule-pickup_panel'){
$('#find-patron').focus();
[% END %]
}
const pickup_date = document.querySelector("#pickup_date");
if ( pickup_date ) {
@ -629,13 +640,6 @@
set_interval_if_needed();
let dt_settings = [];
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'to_be_stagedt', 'json') | $raw %] );
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'staged_and_readyt', 'json') | $raw %] );
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'patron_is_outsidet', 'json') | $raw %] );
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'delivered_todayt', 'json') | $raw %] );
let dt_tables = new Array("to_be_stagedt", "staged_and_readyt", "patron_is_outsidet", "delivered_todayt");
dt_tables.forEach(function( id, index ){
$("#" + id).kohaTable({