LP#1621178 Copy Status Picker user/khuckins/lp1621178-grid-copy-status-picker
authorKyle Huckins <khuckins@catalystdevworks.com>
Tue, 25 Oct 2016 17:12:56 +0000 (10:12 -0700)
committerKyle Huckins <khuckins@catalystdevworks.com>
Thu, 17 Nov 2016 20:26:50 +0000 (12:26 -0800)
Add copy status field to patron items out, patron
checkout, patron hold, item holds pane, holds shelf, and item status grids.

Signed-off-by: Kyle Huckins <khuckins@catalystdevworks.com>
 Changes to be committed:
modified:   Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2
modified:   Open-ILS/src/templates/staff/cat/item/t_list.tt2
modified:   Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
modified:   Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
modified:   Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
modified:   Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
modified:   Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
modified:   Open-ILS/web/js/ui/default/staff/circ/services/holds.js

Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/src/templates/staff/circ/patron/t_holds_list.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/holds.js

index c88663f..31ff5b0 100644 (file)
@@ -88,6 +88,8 @@
     <eg-grid-field path='hold.usr.card.*' parent-idl-class="ahr" hidden></eg-grid-field>
     <eg-grid-field path='hold.requestor.*' parent-idl-class="ahr" hidden></eg-grid-field>
     <eg-grid-field path='hold.requestor.card.*' parent-idl-class="ahr" hidden></eg-grid-field>
+    <eg-grid-field label="[% l('Copy Status') %]" path="hold.current_copy.status.name" hidden>
+    </eg-grid-field>
 
     <eg-grid-field path='volume.*' parent-idl-class="acn" hidden></eg-grid-field>
     <eg-grid-field path='mvr.*' parent-idl-class="mvr" hidden></eg-grid-field>
index 596a24b..37146a8 100644 (file)
@@ -56,6 +56,7 @@
   <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
   <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
   <eg-grid-field label="[% l('Location') %]"    path="location.name" visible></eg-grid-field>
+  <eg-grid-field label="[% l('Copy Status') %]" path="status.name"></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]"       
     path="call_number.record.simple_record.title" visible>
index 1e3cfa4..87dde9b 100644 (file)
@@ -89,6 +89,8 @@
   <eg-grid-field label="[% l('Queue Position') %]" path='queue_position' hidden></eg-grid-field>
   <eg-grid-field path='hold.usr.*' parent-idl-class="ahr" hidden></eg-grid-field>
   <eg-grid-field path='hold.requestor.*' parent-idl-class="ahr" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Copy Status') %]" path="hold.current_copy.status.name" hidden>
+  </eg-grid-field>
   <eg-grid-field path='hold.*' parent-idl-class="ahr" hidden></eg-grid-field>
   <eg-grid-field path='copy.*' parent-idl-class="acp" hidden></eg-grid-field>
   <eg-grid-field path='volume.*' parent-idl-class="acn" hidden></eg-grid-field>
index 8618419..6c4d297 100644 (file)
 
   <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 label="[% l('Copy Status') %]" path="acp.status.name" hidden></eg-grid-field>
   <eg-grid-field path="acn.*" parent-idl-class="acn" hidden></eg-grid-field>
   <eg-grid-field path="record.*" parent-idl-class="mvr" hidden></eg-grid-field>
   <eg-grid-field path="mbts.*" parent-idl-class="mbts" hidden></eg-grid-field>
index 1406f48..2e12f43 100644 (file)
@@ -73,6 +73,8 @@
   <eg-grid-field label="[% l('Queue Position') %]" path='queue_position' hidden></eg-grid-field>
   <eg-grid-field label="[% l('Cancel Cause') %]" path='hold.cancel_cause.label' hidden></eg-grid-field>
   <eg-grid-field path='hold.*' parent-idl-class="ahr" ignore="current_copy" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Copy Status') %]" path="hold.current_copy.status.name" hidden>
+  </eg-grid-field>
   <eg-grid-field path='copy.*' parent-idl-class="acp" hidden></eg-grid-field>
   <eg-grid-field path='hold.usr.*' parent-idl-class="ahr" hidden></eg-grid-field>
   <eg-grid-field path='hold.usr.card.*' parent-idl-class="ahr" hidden></eg-grid-field>
index 270ef90..a5a1ed7 100644 (file)
@@ -91,6 +91,7 @@
   </eg-grid-field>
   <eg-grid-field path="*" hidden></eg-grid-field>
   <eg-grid-field path="target_copy.holds_count.count" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Copy Status') %]" path="target_copy.status.name" hidden></eg-grid-field>
   <eg-grid-field path="target_copy.circ_modifier" hidden></eg-grid-field>
   <eg-grid-field path="target_copy.*" hidden></eg-grid-field>
   <eg-grid-field path="target_copy.call_number.*" hidden></eg-grid-field>
index 5113591..799cb7f 100644 (file)
@@ -98,7 +98,7 @@ function($scope,  $q,  $routeParams,  $timeout,  egCore , egUser,  patronSvc , $
             {   flesh : 4,
                 flesh_fields : {
                     circ : ['target_copy', 'workstation', 'checkin_workstation'],
-                    acp : ['call_number', 'holds_count'],
+                    acp : ['call_number', 'holds_count', 'status'],
                     acn : ['record'],
                     bre : ['simple_record']
                 },
index 2b2ed77..a35d787 100644 (file)
@@ -450,8 +450,14 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
             egCore.pcrud.retrieve('au',hold.usr()).then(function(u) { hold.usr(u) });
 
         // current_copy is not always fleshed in the API
-        if (hold.current_copy() && typeof hold.current_copy() != 'object')
+        if (hold.current_copy() && typeof hold.current_copy() != 'object') {
             hold.current_copy(hold_data.copy);
+            
+            // likewise, current_copy's status isn't fleshed in the API
+            if(hold.current_copy().status() && typeof hold.current_copy().status() != 'object')
+                egCore.pcrud.retrieve('ccs',hold.current_copy().status()
+                    ).then(function(c) { hold.current_copy().status(c) });
+        }
     }
 
     return service;