From ce7486822b082ea64d5fa80c764ba934e804686f Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Mon, 1 Mar 2021 10:41:04 -0500 Subject: [PATCH] PINES Customization to Curbside Pickup 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 --- Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm index 8df972f1c4..4e4d8c2312 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm @@ -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, -- 2.11.0