LP#1621178 Copy Status Picker
authorKyle Huckins <khuckins@catalystdevworks.com>
Tue, 25 Oct 2016 17:12:56 +0000 (10:12 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 26 Apr 2017 14:03:04 +0000 (10:03 -0400)
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>
Signed-off-by: Dawn Dale <ddale@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Conflicts:
Open-ILS/src/templates/staff/cat/item/t_list.tt2

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 f793a66..aafa779 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 f448c0d..42dd3f2 100644 (file)
@@ -65,7 +65,7 @@
     {{item['_circ']['due_date'] | date:'short'}}
   </eg-grid-field>
   <eg-grid-field label="[% l('Location') %]"       path="location.name" visible></eg-grid-field>
-  <eg-grid-field label="[% l('Status') %]"         path="status.name" visible></eg-grid-field>
+  <eg-grid-field label="[% l('Copy Status') %]"    path="status.name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Title') %]"       
     path="call_number.record.simple_record.title" visible>
     <a target="_blank" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['call_number.record.id']}}">
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 b2df987..7035413 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 7487404..eaeb4b4 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 27aae5e..204d2a5 100644 (file)
@@ -462,8 +462,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;