From 97d70c911a3e67a0bf56bb4eab1c0c739c284ea6 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 16 Jun 2020 12:06:55 -0400 Subject: [PATCH] LP#1879983: Fetch what's needed to display curbside from history We know to show the curbside subtab when extant, available holds are at pickup libs that have curbside enabled. So, let's fetch those and test when gathering the history subtab data. Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 2fc2b701dd..ee45cc3dd5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -2228,6 +2228,15 @@ sub load_myopac_hold_history { where => {id => $e->requestor->id} }); + # This is used to detect whether we want to show the curbside tab + my $extant_holds_object = $self->fetch_user_holds(); + if($extant_holds_object->{holds}) { + $ctx->{curbside_pickup_libs} = []; + for my $pul (@{$extant_holds_object->{pickup_libs}}) { + push(@{$ctx->{curbside_pickup_libs}}, $pul) if $ctx->{get_org_setting}->($pul, 'circ.curbside'); + } + } + my $holds_object = $self->fetch_user_holds([map { $_->{id} } @$hold_ids], 0, 1, 0, $limit, $offset); if($holds_object->{holds}) { $ctx->{holds} = $holds_object->{holds}; -- 2.11.0