From: pines Date: Sun, 3 Sep 2006 22:33:49 +0000 (+0000) Subject: new uber holds detail. Does this make it faster? X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=117370dadf8d798ac24cbca80f614b858b641612;p=Evergreen.git new uber holds detail. Does this make it faster? git-svn-id: svn://svn.open-ils.org/ILS/trunk@5901 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 2ec1eb6f93..1d4bf08d4d 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -54,6 +54,7 @@ const api = { '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' }, diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index f8de568153..5ce24d471c 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -847,7 +847,7 @@ circ.util.hold_columns = function(modify,params) { }, { '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++) { diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 77b329dee3..22587b0661 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -46,6 +46,38 @@ patron.holds.prototype = { '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 { @@ -167,7 +199,7 @@ patron.holds.prototype = { } } ); - + */ } catch(E) { obj.error.sdump('D_ERROR','retrieve_row: ' + E ); }