lp1732975 Parts Column Not Populated
authorKyle Huckins <khuckins@catalyte.io>
Wed, 2 May 2018 17:47:04 +0000 (17:47 +0000)
committerKathy Lussier <klussier@masslnc.org>
Fri, 25 May 2018 21:10:01 +0000 (17:10 -0400)
- Retrieve Parts information in egItem

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/src/templates/staff/cat/item/t_list.tt2
modified:   Open-ILS/web/js/ui/default/staff/circ/services/item.js

Signed-off-by: Jeanette Lundgren <jlundgren@cwmars.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/web/js/ui/default/staff/circ/services/item.js

index 09a073d..a7de8ec 100644 (file)
   <eg-grid-field label="[% l('OPAC Visible?') %]"         path="opac_visible" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Owned By') %]"              path="call_number.record.owner" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Owning Library') %]"        path="call_number.owning_lib.shortname" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Parts') %]"                 path="parts" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Parts') %]"                 path="parts.label" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Price') %]"                 path="price" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Publication Date') %]"      path="call_number.record.simple_record.pubdate" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Publisher') %]"             path="call_number.record.simple_record.publisher" hidden></eg-grid-field>
index 963c0c9..b1285af 100644 (file)
@@ -174,6 +174,18 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
                 copyData.copy._inHouseUseCount = uses.length;
             });
 
+            //Get Monograph Parts
+            egCore.pcrud.search('acpm',
+                {target_copy: flatCopy.id},
+                { flesh : 1, flesh_fields : { acpm : ['part'] } },
+                {atomic :true})
+            .then(function(acpm_array) {
+                angular.forEach(acpm_array, function(acpm) {
+                    flatCopy.parts = egCore.idl.toHash(acpm.part());
+                    copyData.copy.parts = egCore.idl.toHash(acpm.part());
+                });
+            });
+
             return lastRes = {
                 copy : copyData.copy,
                 index : flatCopy.index