{{item['barcode']}}
</a>
</eg-grid-field>
+ <eg-grid-field label="[% l('CN Prefix') %]" path="call_number.prefix.label"></eg-grid-field>
<eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('CN Suffix') %]" path="call_number.suffix.label"></eg-grid-field>
<eg-grid-field label="[% l('Location') %]" path="location.name" visible></eg-grid-field>
<eg-grid-field label="[% l('Title') %]"
</a>
</eg-grid-field>
<eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('CN Prefix') %]" path="call_number.prefix.label"></eg-grid-field>
+ <eg-grid-field label="[% l('CN Suffix') %]" path="call_number.suffix.label"></eg-grid-field>
<eg-grid-field label="[% l('Location') %]" path="location.name" visible></eg-grid-field>
<eg-grid-field label="[% l('Title') %]"
</eg-grid-field>
<eg-grid-field path='volume.*' parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path='volume.prefix.label' label="[% l('CN Prefix') %]" parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path='volume.suffix.label' label="[% l('CN Suffix') %]" parent-idl-class="acn" hidden></eg-grid-field>
<eg-grid-field path='mvr.*' parent-idl-class="mvr" hidden></eg-grid-field>
</eg-grid>
<eg-grid-field label="[% l('Barcode') %]" path='barcode' visible></eg-grid-field>
<eg-grid-field label="[% l('Created') %]" path="create_date" datatype="timestamp" visible></eg-grid-field>
<eg-grid-field label="[% l('Activated') %]" path="active_date" visible></eg-grid-field>
+ <eg-grid-field label="[% l('CN Prefix') %]" path="call_number.prefix.label" visible></eg-grid-field>
<eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('CN Suffix') %]" path="call_number.suffix.label" visible></eg-grid-field>
<eg-grid-field label="[% l('Copy ID') %]" path="id" hidden></eg-grid-field>
</eg-grid>
<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>
+ <eg-grid-field path="acn.prefix.label" label="[% l('CN Prefix') %]" parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path="acn.suffix.label" label="[% l('CN Suffix') %]" 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>
<eg-grid-field path="au.*" parent-idl-class="au" 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>
+ <eg-grid-field path='volume.prefix.label' label="[% l('CN Prefix') %]" parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path='volume.suffix.label' label="[% l('CN Suffix') %]" parent-idl-class="acn" hidden></eg-grid-field>
<eg-grid-field path='mvr.*' parent-idl-class="mvr" hidden></eg-grid-field>
</eg-grid>
<eg-grid-field label="[% l('# of Uses') %]" path='num_uses' visible></eg-grid-field>
<eg-grid-field label="[% l('Barcode') %]" path='copy.barcode' visible></eg-grid-field>
+ <eg-grid-field label="[% l('CN Prefix') %]" path="copy.call_number.prefix.label" visible></eg-grid-field>
<eg-grid-field label="[% l('Call Number') %]" path="copy.call_number.label" visible></eg-grid-field>
+ <eg-grid-field label="[% l('CN Suffix') %]" path="copy.call_number.suffix.label" visible></eg-grid-field>
<eg-grid-field label="[% l('Location') %]" path="copy.location.name" visible></eg-grid-field>
<eg-grid-field label="[% l('Title') %]" path="title" visible></eg-grid-field>
</eg-grid>
<eg-grid-field path="summary.*" hidden></eg-grid-field>
<eg-grid-field path="circulation.target_copy.*" hidden></eg-grid-field>
<eg-grid-field path="circulation.target_copy.call_number.*" hidden></eg-grid-field>
+ <eg-grid-field path="circulation.target_copy.call_number.prefix.label" label="[% l('CN Prefix') %]" hidden></eg-grid-field>
+ <eg-grid-field path="circulation.target_copy.call_number.suffix.label" label="[% l('CN Suffix') %]" hidden></eg-grid-field>
</eg-grid>
</div>
<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>
+ <eg-grid-field path="acn.prefix.label" label="[% l('CN Prefix') %]" parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path="acn.suffix.label" label="[% l('CN Suffix') %]" 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>
<eg-grid-field path="au.*" parent-idl-class="au" 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 path='volume.*' parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path='volume.prefix.label' label="[% l('CN Prefix') %]" parent-idl-class="acn" hidden></eg-grid-field>
+ <eg-grid-field path='volume.suffix.label' label="[% l('CN Suffix') %]" parent-idl-class="acn" hidden></eg-grid-field>
<eg-grid-field path='mvr.*' parent-idl-class="mvr" hidden></eg-grid-field>
</eg-grid>
<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>
+ <eg-grid-field path="target_copy.call_number.prefix.label" label="[% l('CN Prefix') %]" hidden></eg-grid-field>
+ <eg-grid-field path="target_copy.call_number.suffix.label" label="[% l('CN Suffix') %]" hidden></eg-grid-field>
<eg-grid-field path="target_copy.call_number.record.*" hidden></eg-grid-field>
<eg-grid-field path="target_copy.call_number.record.simple_record.*" hidden></eg-grid-field>
</eg-grid>
<eg-grid-field label="[% l('Bill #') %]"
path='circ.id'></eg-grid-field>
- <eg-grid-field label="[% l('Call Number') %]"
+ <eg-grid-field label="[% l('CN Prefix') %]"
+ path="acn.prefix.label"></eg-grid-field>
+
+ <eg-grid-field label="[% l('Call Number') %]"
path="acn.label"></eg-grid-field>
+ <eg-grid-field label="[% l('CN Suffix') %]"
+ path="acn.suffix.label"></eg-grid-field>
+
<eg-grid-field label="[% l('Due Date') %]"
path='circ.due_date' datecontext="circ_lib" dateonlyinterval="duration" datatype="timestamp"></eg-grid-field>
</eg-grid-field>
<eg-grid-field path='target_copy.circ_lib.shortname' hidden></eg-grid-field>
<eg-grid-field path='target_copy.location.name' label="[% l('Copy Location') %]" hidden sortable></eg-grid-field>
+ <eg-grid-field label="[% l('CN Prefix') %]" path="target_copy.call_number.prefix.label"></eg-grid-field>
<eg-grid-field path='target_copy.call_number.label' hidden sortable></eg-grid-field>
+ <eg-grid-field label="[% l('CN Suffix') %]" path="target_copy.call_number.suffix.label"></eg-grid-field>
<eg-grid-field path='target_copy.call_number.record.simple_record.title' label="[% l('Title') %]" sortable>
<a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['target_copy.call_number.record.simple_record.id']}}">
{{item['target_copy.call_number.record.simple_record.title']}}
{ flesh : 3,
flesh_fields : {
acp : ['call_number','location'],
- acn : ['record'],
+ acn : ['record', 'prefix', 'suffix'],
bre : ['simple_record']
},
select : { bre : ['id'] } // avoid fleshing MARC
flesh_fields : {
circ : ['target_copy', 'workstation', 'checkin_workstation'],
acp : ['call_number', 'holds_count', 'status', 'circ_lib'],
- acn : ['record', 'owning_lib'],
+ acn : ['record', 'owning_lib', 'prefix', 'suffix'],
bre : ['simple_record']
},
// avoid fetching the MARC blob by specifying which
return;
}
+ // retrieve call number affixes prior to sending payload data to the grid
+ if (payload.volume && typeof payload.volume.prefix() != 'object') {
+ egCore.pcrud.retrieve('acnp',payload.volume.prefix()).then(function(p) {payload.volume.prefix(p)});
+ };
+ if (payload.volume && typeof payload.volume.suffix() != 'object') {
+ egCore.pcrud.retrieve('acns',payload.volume.suffix()).then(function(s) {payload.volume.suffix(s)});
+ };
+
data.circ = payload.circ;
data.parent_circ = payload.parent_circ;
data.hold = payload.hold;
|| hold_data.status;
var hold = hold_data.hold;
+ var volume = hold_data.volume;
hold.pickup_lib(egCore.org.get(hold.pickup_lib()));
hold.current_shelf_lib(egCore.org.get(hold.current_shelf_lib()));
hold_data.id = hold.id();
egCore.pcrud.retrieve('ccs',hold.current_copy().status()
).then(function(c) { hold.current_copy().status(c) });
}
+
+ //Call number affixes are not always fleshed in the API
+ if (volume.prefix() && typeof volume.prefix() != 'object') {
+ console.debug('fetching call number prefix');
+ egCore.pcrud.retrieve('acnp',volume.prefix()).then(function(p) {volume.prefix(p)});
+ }
+ if (volume.suffix() && typeof volume.suffix() != 'object') {
+ console.debug('fetching call number prefix');
+ egCore.pcrud.retrieve('acns',volume.suffix()).then(function(s) {volume.suffix(s)});
+ }
}
return service;
'flesh_fields' : {
'atc' : ['target_copy','dest','source','hold_transit_copy'],
'acp' : ['call_number','location','circ_lib'],
- 'acn' : ['record'],
+ 'acn' : ['record', 'prefix', 'suffix'],
'bre' : ['simple_record'],
'ahtc' : ['hold'],
'ahr' : ['usr'],