From d386d7c604d92b443e1698fb1efa5d6f5eb45627 Mon Sep 17 00:00:00 2001 From: Remington Steed Date: Wed, 7 Nov 2018 11:02:48 -0500 Subject: [PATCH] LP#1761222: Add four columns available in XUL client The XUL client had these columns but they hadn't been added to the web client yet. This commit adds them: - Classification - Due Date - OPAC visible? - Quality Signed-off-by: Remington Steed Signed-off-by: Bill Erickson Signed-off-by: Tiffany Little Signed-off-by: Chris Sharp --- .../src/templates/staff/cat/catalog/t_holdings.tt2 | 4 ++++ .../web/js/ui/default/staff/cat/services/holdings.js | 19 +++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 index 128a590b40..3d827ddac5 100644 --- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 +++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 @@ -138,6 +138,10 @@ + + + + diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js index 0354667143..78055cf402 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js @@ -16,7 +16,8 @@ function(egCore , $q) { flesh : 3, flesh_fields : { acp : ['status','location','circ_lib','parts','age_protect','copy_alerts', 'latest_inventory'], - acn : ['prefix','suffix','copies'], + acn : ['prefix','suffix','copies','label_class','record'], + bre : ['simple_record'], alci : ['inventory_workstation'] } } @@ -130,12 +131,26 @@ function(egCore , $q) { } ); - // create virtual field for copy alert count + // create virtual fields for copy alert count and most recent circ angular.forEach(svc.copies, function (cp) { if (cp.copy_alerts) { cp.copy_alert_count = cp.copy_alerts.filter(function(aca) { return aca.ack_time == null ;}).length; } else cp.copy_alert_count = 0; + + var copy_circ = egCore.pcrud.search('combcirc', { target_copy : cp.id }, + { + order_by : {combcirc : 'xact_start desc'}, + limit : 1 + } + ).then(function(copy_circ) { + if (copy_circ) { + cp._circ = egCore.idl.toHash(copy_circ, true); + cp._circ_lib = copy_circ.circ_lib(); + cp._duration = copy_circ.duration(); + } + return copy_circ; + }); }); // create a label using just the unique part of the owner list -- 2.11.0