From 4e6fe743271992347686a113c390b208c162942b Mon Sep 17 00:00:00 2001 From: Dan Briem Date: Thu, 30 Dec 2021 09:51:34 -0500 Subject: [PATCH] LP#1955931 Staff catalog show more details - add due date Adds a due date column to the show more details view in the Angular staff catalog. Signed-off-by: Dan Briem Signed-off-by: Garry Collum Signed-off-by: Michele Morgan --- .../eg2/src/app/staff/catalog/result/record.component.html | 12 ++++++++---- .../src/perlmods/lib/OpenILS/Application/Search/Biblio.pm | 13 ++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html index 868d6fe17d..7b070fe6f5 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html @@ -242,18 +242,22 @@
Library
Shelving location
-
Call number
-
Status
+
Call number
+
Status
+
Due date
{{copy.circ_lib_sn}}
{{copy.copy_location}}
-
+
{{copy.call_number_prefix_label}} {{copy.call_number_label}} {{copy.call_number_suffix_label}}
-
{{copy.copy_status}}
+
{{copy.copy_status}}
+
+ {{copy.due_date | date:'shortDate'}} +
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 20cec4eb26..3af4a33d90 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -3163,12 +3163,12 @@ sub get_representative_copies { return [] unless $org; my $func = 'unapi.biblio_record_entry_feed'; - my $includes = '{holdings_xml,acp,acnp,acns}'; + my $includes = '{holdings_xml,acp,acnp,acns,circ}'; my $limits = "acn=>$limit,acp=>$limit"; if ($is_meta) { $func = 'unapi.metabib_virtual_record_feed'; - $includes = '{holdings_xml,acp,acnp,acns,mmr.unapi}'; + $includes = '{holdings_xml,acp,acnp,acns,circ,mmr.unapi}'; $limits .= ",bre=>$limit"; } @@ -3196,6 +3196,12 @@ sub get_representative_copies { my $status = $copy->getElementsByTagName('status')->[0]->textContent; my $location = $copy->getElementsByTagName('location')->[0]->textContent; my $circ_lib_sn = $copy->getElementsByTagName('circ_lib')->[0]->getAttribute('shortname'); + my $due_date = ''; + + my $current_circ = $copy->findnodes('./*[local-name()="current_circulation"]')->[0]; + if (my $circ = $current_circ->findnodes('./*[local-name()="circ"]')) { + $due_date = $circ->[0]->getAttribute('due_date'); + } push(@$copies, { call_number_label => $label, @@ -3203,7 +3209,8 @@ sub get_representative_copies { call_number_suffix_label => $suffix, circ_lib_sn => $circ_lib_sn, copy_status => $status, - copy_location => $location + copy_location => $location, + due_date => $due_date }); } } -- 2.11.0