- 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>
<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>
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