'FM_AHN_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_notification.create' },
'FM_AHN_RETRIEVE_VIA_AHR' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_notification.retrieve_by_hold' },
'FM_AHR_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve_by_id' },
+ 'FM_AHR_BLOB_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.details.retrieve' },
'FM_AHR_RETRIEVE_VIA_AU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve' },
'FM_AHR_ID_LIST_RETRIEVE_VIA_AU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.id_list.retrieve' },
'FM_AHR_RETRIEVE_VIA_BRE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.open_holds.retrieve' },
},
{
'persist' : 'hidden width ordinal', 'id' : 'patron_name', 'label' : 'Patron Name', 'flex' : 1,
- 'primary' : false, 'hidden' : true, 'render' : 'JSAN.use("patron.util"); var temp1 = patron.util.retrieve_name_via_id( ses(), my.ahr.usr() ); temp1[0] + ", " + temp1[1] + " " + temp1[2];',
+ 'primary' : false, 'hidden' : true, 'render' : 'my.patron_barcode + " " + my.patron_family_name + ", " + my.patron_first_given_name;',
}
];
for (var i = 0; i < c.length; i++) {
'retrieve_row' : function(params) {
var row = params.row;
try {
+ obj.network.simple_request('FM_AHR_BLOB_RETRIEVE', [ ses(), row.my.hold_id ],
+ function(blob_req) {
+ try {
+ var blob = blob_req.getResultObject();
+ if (typeof blob.ilsevent != 'undefined') throw(blob);
+ row.my.ahr = blob.hold;
+ row.my.status = blob.status;
+ row.my.acp = blob.copy;
+ row.my.acn = blob.volume;
+ row.my.mvr = blob.mvr;
+ row.my.patron_family_name = blob.patron_last;
+ row.my.patron_first_given_name = blob.patron_first;
+ row.my.patron_barcode = blob.patron_barcode;
+
+ obj.holds_map[ row.my.ahr.id() ] = row.my.ahr;
+ params.row_node.setAttribute('retrieve_id',
+ js2JSON({
+ 'copy_id':row.my.ahr.current_copy(),
+ 'id':row.my.ahr.id(),
+ 'type':row.my.ahr.hold_type(),
+ 'target':row.my.ahr.target(),
+ 'usr':row.my.ahr.usr(),
+ })
+ );
+ if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); }
+
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('Error retrieving details for hold #' + row.my.hold_id, E);
+ }
+ }
+ );
+ /*
obj.network.simple_request('FM_AHR_RETRIEVE', [ ses(), row.my.hold_id ],
function(ahr_req) {
try {
}
}
);
-
+ */
} catch(E) {
obj.error.sdump('D_ERROR','retrieve_row: ' + E );
}