LP#1685933 - Add Owning Library column to grids in ItemsOut and checkout views
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 15 Jun 2017 15:30:48 +0000 (11:30 -0400)
committerJason Etheridge <jason@equinoxinitiative.org>
Mon, 3 Jul 2017 17:54:34 +0000 (13:54 -0400)
Added necessary fleshing in egCirc service and items out to get acn.owning_lib.shortname

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org>
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index c9c59bb..57f4b45 100644 (file)
     path="author" hidden></eg-grid-field>
   <eg-grid-field path="acp.circ_modifier.name" label="[% l('Circulation Modifier') %]"></eg-grid-field>
   <eg-grid-field path="acp.circ_lib.shortname" label="[% l('Circulation Library') %]"></eg-grid-field>
+  <eg-grid-field path="acn.owning_lib.shortname" label="[% l('Owning Library') %]"></eg-grid-field>
   <eg-grid-field path="circ.*" parent-idl-class="circ" hidden></eg-grid-field>
   <eg-grid-field path="acp.*" parent-idl-class="acp" hidden></eg-grid-field>
   <eg-grid-field path="acn.*" parent-idl-class="acn" hidden></eg-grid-field>
index c8b0d1f..01edcab 100644 (file)
@@ -84,6 +84,7 @@
   <eg-grid-field label="[% l('Workstation') %]" path='workstation.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkin Workstation') %]" path='checkin_workstation.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkout / Renewal Library') %]" path='circ_lib.shortname'></eg-grid-field>
+  <eg-grid-field label="[% l('Owning Library') %]" path='target_copy.call_number.owning_lib.shortname'></eg-grid-field>
   <eg-grid-field label="[% l('Renewals Remaining') %]" path='renewal_remaining'></eg-grid-field>
   <eg-grid-field label="[% l('Fines Stopped') %]" path='stop_fines'></eg-grid-field>
   <eg-grid-field label="[% l('Title') %]" path="target_copy.call_number.record.simple_record.title" name="title">
index be77ab2..2f9692f 100644 (file)
@@ -107,7 +107,7 @@ function($scope,  $q,  $routeParams,  $timeout,  egCore , egUser,  patronSvc , $
                 flesh_fields : {
                     circ : ['target_copy', 'workstation', 'checkin_workstation'],
                     acp : ['call_number', 'holds_count', 'status'],
-                    acn : ['record'],
+                    acn : ['record', 'owning_lib'],
                     bre : ['simple_record']
                 },
                 // avoid fetching the MARC blob by specifying which 
index 00dc293..3ec7822 100644 (file)
@@ -536,9 +536,10 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
         var promises = [];
         var payload;
         if (!evt[0] || !(payload = evt[0].payload)) return $q.when();
-
+        
         promises.push(service.flesh_copy_location(payload.copy));
         if (payload.copy) {
+            promises.push(service.flesh_acn_owning_lib(payload.volume));
             promises.push(service.flesh_copy_circ_library(payload.copy));
             promises.push(service.flesh_copy_circ_modifier(payload.copy));
             promises.push(
@@ -594,6 +595,11 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
         return $q.all(promises);
     }
 
+    service.flesh_acn_owning_lib = function(acn) {
+        if (!acn) return $q.when();
+        return $q.when(acn.owning_lib(egCore.org.get( acn.owning_lib() )));
+    }
+
     service.flesh_copy_circ_library = function(copy) {
         if (!copy) return $q.when();