|
Lines 472-478
Link Here
|
| 472 |
<script> |
472 |
<script> |
| 473 |
let pickups = [% To.json(curbside_pickups.unblessed) | $raw %]; |
473 |
let pickups = [% To.json(curbside_pickups.unblessed) | $raw %]; |
| 474 |
let policy = [% To.json(policy.unblessed) | $raw %]; |
474 |
let policy = [% To.json(policy.unblessed) | $raw %]; |
|
|
475 |
let opening_slots = [% To.json(policy.opening_slots.unblessed) | $raw %]; |
| 476 |
|
| 477 |
let dt_settings = []; |
| 478 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'to_be_stagedt', 'json') | $raw %] ); |
| 479 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'staged_and_readyt', 'json') | $raw %] ); |
| 480 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'patron_is_outsidet', 'json') | $raw %] ); |
| 481 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'delivered_todayt', 'json') | $raw %] ); |
| 482 |
|
| 483 |
const tab = "[% tab | html %]"; |
| 475 |
|
484 |
|
|
|
485 |
</script> |
| 486 |
|
| 487 |
<script> |
| 476 |
let existingPickupMoments = []; |
488 |
let existingPickupMoments = []; |
| 477 |
pickups.forEach(function(pickup){ |
489 |
pickups.forEach(function(pickup){ |
| 478 |
let scheduled_pickup_datetime = pickup.scheduled_pickup_datetime; |
490 |
let scheduled_pickup_datetime = pickup.scheduled_pickup_datetime; |
|
Lines 481-487
Link Here
|
| 481 |
existingPickupMoments.push(pickupMoment); |
493 |
existingPickupMoments.push(pickupMoment); |
| 482 |
}); |
494 |
}); |
| 483 |
|
495 |
|
| 484 |
let opening_slots = [% To.json(policy.opening_slots.unblessed) | $raw %]; |
|
|
| 485 |
let slots_per_day = {}; |
496 |
let slots_per_day = {}; |
| 486 |
opening_slots.forEach(function(slot){ |
497 |
opening_slots.forEach(function(slot){ |
| 487 |
let day = slot.day; |
498 |
let day = slot.day; |
|
Lines 495-503
Link Here
|
| 495 |
$('#find-patron').focus(); |
506 |
$('#find-patron').focus(); |
| 496 |
}); |
507 |
}); |
| 497 |
|
508 |
|
| 498 |
[% IF tab == 'schedule-pickup_panel' %] |
509 |
if (tab == 'schedule-pickup_panel'){ |
| 499 |
$('#find-patron').focus(); |
510 |
$('#find-patron').focus(); |
| 500 |
[% END %] |
511 |
} |
| 501 |
|
512 |
|
| 502 |
const pickup_date = document.querySelector("#pickup_date"); |
513 |
const pickup_date = document.querySelector("#pickup_date"); |
| 503 |
if ( pickup_date ) { |
514 |
if ( pickup_date ) { |
|
Lines 629-641
Link Here
|
| 629 |
|
640 |
|
| 630 |
set_interval_if_needed(); |
641 |
set_interval_if_needed(); |
| 631 |
|
642 |
|
| 632 |
|
|
|
| 633 |
let dt_settings = []; |
| 634 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'to_be_stagedt', 'json') | $raw %] ); |
| 635 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'staged_and_readyt', 'json') | $raw %] ); |
| 636 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'patron_is_outsidet', 'json') | $raw %] ); |
| 637 |
dt_settings.push( [% TablesSettings.GetTableSettings('circ', 'curbside_pickups', 'delivered_todayt', 'json') | $raw %] ); |
| 638 |
|
| 639 |
let dt_tables = new Array("to_be_stagedt", "staged_and_readyt", "patron_is_outsidet", "delivered_todayt"); |
643 |
let dt_tables = new Array("to_be_stagedt", "staged_and_readyt", "patron_is_outsidet", "delivered_todayt"); |
| 640 |
dt_tables.forEach(function( id, index ){ |
644 |
dt_tables.forEach(function( id, index ){ |
| 641 |
$("#" + id).kohaTable({ |
645 |
$("#" + id).kohaTable({ |
| 642 |
- |
|
|