main-label="[% l('Items Checked In') %]"
items-provider="gridDataProvider"
grid-controls="gridControls"
- persist-key="circ.checkin">
+ persist-key="circ.renew">
<eg-grid-action
handler="fetchLastCircPatron"
path="acp.alert_message"></eg-grid-field>
<eg-grid-field label="[% l('Balance Owed') %]"
- path='circ.billable_transaction.summary.balance_owed'></eg-grid-field>
+ path='mbts.balance_owed'></eg-grid-field>
<eg-grid-field label="[% l('Barcode') %]" path="acp_barcode">
<!-- FIXME: ng-if / ng-disabled not working since the contents
path='circ.id'></eg-grid-field>
<eg-grid-field label="[% l('Call Number') %]"
- path="acn.label" hidden></eg-grid-field>
+ path="acn.label"></eg-grid-field>
<eg-grid-field label="[% l('Due Date') %]"
- path='circ.due_date' dateformat='short' hidden></eg-grid-field>
-
- <eg-grid-field label="[% l('Checkin Date') %]"
- path='circ.checkin_time' dateformat='short'></eg-grid-field>
+ path='circ.due_date' dateformat='short'></eg-grid-field>
<eg-grid-field label="[% l('Family Name') %]"
path='au.family_name'></eg-grid-field>
- <eg-grid-field label="[% l('Finish') %]"
- path='circ.stop_fines_time'></eg-grid-field>
-
<eg-grid-field label="[% l('Location') %]"
path='acp.location.name'> </eg-grid-field>
<eg-grid-field label="[% l('Remaining Renewals') %]"
path='circ.renewal_remaining'></eg-grid-field>
- <eg-grid-field label="[% l('Start') %]"
- path='circ.xact_start'></eg-grid-field>
-
<eg-grid-field label="[% l('Title') %]" path="title">
<a target="_self" href="[% ctx.base_path %]/opac/record/{{record.doc_id()}}">
{{item.title}}
if (!payload) return;
data.circ = payload.circ;
+ data.parent_circ = payload.parent_circ;
data.hold = payload.hold;
data.record = payload.record;
data.acp = payload.copy;
data.isbn = final_resp.evt.isbn;
data.route_to = final_resp.evt.route_to;
+ // for checkin, the mbts lives on the main circ
if (payload.circ && payload.circ.billable_transaction())
data.mbts = payload.circ.billable_transaction().summary();
+ // on renewals, the mbts lives on the parent circ
+ if (payload.parent_circ && payload.parent_circ.billable_transaction())
+ data.mbts = payload.parent_circ.billable_transaction().summary();
+
if (!data.route_to) {
if (data.transit) {
data.route_to = data.transit.dest().shortname();
transit.dest(egCore.org.get(transit.dest()));
}
+ // TODO: renewal responses should include the patron
+ if (!payload.patron && payload.circ) {
+ promises.push(
+ egCore.pcrud.retrieve('au', payload.circ.usr())
+ .then(function(user) {payload.patron = user})
+ );
+ }
+
// extract precat values
evt.title = payload.record ? payload.record.title() :
(payload.copy ? payload.copy.dummy_title() : null);