PINES Customization to Curbside Pickup
authorTerran McCanna <tmccanna@georgialibraries.org>
Mon, 1 Mar 2021 15:41:04 +0000 (10:41 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 8 Nov 2021 14:58:45 +0000 (09:58 -0500)
Currently, the curbside module only allows you to view items
to be staged and items that are staged 2 time slots ahead. This is
hardcoded in the perlmod and really should be org unit settings, but
for now, this adjusts that number to 10 slots ahead as a temporary
workaround.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm

index 8df972f..4e4d8c2 100644 (file)
@@ -428,7 +428,9 @@ sub fetch_to_be_staged {
     my $gran = $U->ou_ancestor_setting_value($org, 'circ.curbside.granularity') || '15 minutes';
     my $gran_seconds = interval_to_seconds($gran);
     my $horizon = DateTime->now; # NOTE: does not need timezone set because it gets UTC, not floating, so we can math with it
-    $horizon->add(seconds => $gran_seconds * 2);
+    #PINES Customization: Fetch next 10 slots instead of next 2
+    #$horizon->add(seconds => $gran_seconds * 2);
+    $horizon->add(seconds => $gran_seconds * 10);
 
     my $slots = $e->search_action_curbside([{
         org => $org,
@@ -475,7 +477,9 @@ sub fetch_latest_to_be_staged {
     my $gran = $U->ou_ancestor_setting_value($org, 'circ.curbside.granularity') || '15 minutes';
     my $gran_seconds = interval_to_seconds($gran);
     my $horizon = DateTime->now; # NOTE: does not need timezone set because it gets UTC, not floating, so we can math with it
-    $horizon->add(seconds => $gran_seconds * 2);
+    #PINES Customization - fetch next 10 slots instead of next 2
+    #$horizon->add(seconds => $gran_seconds * 2);
+    $horizon->add(seconds => $gran_seconds * 10);
 
     my $slots = $e->search_action_curbside([{
         org => $org,