<style> li { padding: 8px; margin 5px; }</style>
<div>[% date.format %]</div>
<br/>
-
- [% user.family_name %], [% user.first_given_name %]
+ Holds for:<br/>
+ [% user.family_name %], [% user.first_given_name %]
+
<ol>
[% FOR hold IN target %]
[%-
SET udata = user_data.$idx
-%]
<li>
- <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
- <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
- <div>Pickup Location: [% hold.pickup_lib.name %]</div>
+ <div>Title: [% udata.item_title %]</div>
+ <div>Author: [% udata.item_author %]</div>
+ <div>Pickup Location: [% udata.pickup_lib %]</b></div>
<div>Status:
[%- IF udata.ready -%]
Ready for pickup
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE action_trigger.event_definition SET template =
+$$
+[%- USE date -%]
+[%- SET user = target.0.usr -%]
+<div>
+ <style> li { padding: 8px; margin 5px; }</style>
+ <div>[% date.format %]</div>
+ <br/>
+ Holds for:<br/>
+ [% user.family_name %], [% user.first_given_name %]
+
+ <ol>
+ [% FOR hold IN target %]
+ [%-
+ SET idx = loop.count - 1;
+ SET udata = user_data.$idx;
+ -%]
+ <li>
+ <div>Title: [% udata.item_title %]</div>
+ <div>Author: [% udata.item_author %]</div>
+ <div>Pickup Location: [% udata.pickup_lib %]</b></div>
+ <div>Status:
+ [%- IF udata.ready -%]
+ Ready for pickup
+ [% ELSE %]
+ #[% udata.queue_position %] of
+ [% udata.potential_copies %] copies.
+ [% END %]
+ </div>
+ </li>
+ [% END %]
+ </ol>
+</div>
+
+$$ WHERE id=12;
+
+COMMIT;
\ No newline at end of file
this.checkouts = [];
this.itemsOut = [];
+ this.holds = [];
// During renewals, keep track of the ID of the previous circulation.
// Previous circ is used for tracking failed renewals (for receipts).
}
SelfCheckManager.prototype.insertHold = function(data) {
+
+ // store hold data to pass along to receipt printing function
+ this.holds.push(data);
+
var row = this.holdTemplate.cloneNode(true);
if(data.mvr.isbn()) {
}
/**
- * Print a receipt for this user's items out
+ * Print a receipt for this user's holds
*/
SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
dojo.forEach(this.holds,
function(data) {
holdIds.push(data.hold.id());
+
+ //get pickup library info
+ var pu = fieldmapper.standardRequest(['open-ils.actor','open-ils.actor.org_unit.retrieve'],[null,data.hold.pickup_lib()]);
+
if(data.status == 4) {
- holdData.push({ready : true});
+ holdData.push({
+ ready : true,
+ item_title : data.mvr.title(),
+ item_author : data.mvr.author(),
+ pickup_lib : pu.name()
+ });
} else {
holdData.push({
queue_position : data.queue_position,
- potential_copies : data.potential_copies
+ potential_copies : data.potential_copies,
+ item_title : data.mvr.title(),
+ item_author : data.mvr.author(),
+ pickup_lib : pu.name()
});
}
}
--- /dev/null
+Self-Check Printing
+^^^^^^^^^^^^^
+Corrections were made to the Self-Check Holds functionality to allow
+printing. The change requires that the Self-Checkout Holds Receipt
+action trigger template be updated in order to work properly.