From: Remington Steed Date: Wed, 7 Nov 2018 16:02:48 +0000 (-0500) Subject: LP#1761222: Add four columns available in XUL client X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e4123dca771f0515b28fac2486b81c33b74514d5;p=working%2FEvergreen.git 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 --- 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 2b93924d84..4c87d4ce24 100644 --- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 +++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 @@ -133,6 +133,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 442a4d0293..7fac840570 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'] } } @@ -125,10 +126,24 @@ 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.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