From 7fe4876c3e3beb94cb93ca8afcb0d8955826b21b Mon Sep 17 00:00:00 2001 From: lmcfarland Date: Wed, 24 Jun 2009 13:54:18 +0000 Subject: [PATCH] Added functionality to holds menus to include columns for Total Holds Available, Queue Position, Potential Copies, and Estimated Wait git-svn-id: svn://svn.open-ils.org/ILS/trunk@13454 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/util.js | 36 ++++++++++++++++++++++ .../server/locale/en-US/circ.properties | 4 +++ Open-ILS/xul/staff_client/server/patron/holds.js | 8 +++-- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 967ec6f916..3c1c40c65f 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1813,6 +1813,42 @@ circ.util.hold_columns = function(modify,params) { 'hidden' : true, 'render' : function(my) { return my.acn.label(); } }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'total_holds', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.total_holds'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'render' : function(my) { return my.total_holds; } + }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'queue_position', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.queue_position'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'render' : function(my) { return my.queue_position; } + }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'potential_copies', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.potential_copies'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'render' : function(my) { return my.potential_copies; } + }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'estimated_wait', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.estimated_wait'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'render' : function(my) { return my.estimated_wait; } + } ]; for (var i = 0; i < c.length; i++) { if (modify[ c[i].id ]) { diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 7a5fb3360f..0c1d05fd7a 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -314,6 +314,10 @@ staff.circ.utils.route_to.no_address=We do not have a holds address for this lib staff.circ.utils.route_to.no_address.error=Unable to retrieve mailing address. staff.circ.utils.payload.author=Author: %1$s staff.circ.utils.payload.in_transit=%1$s is in transit. +staff.circ.utils.estimated_wait=Estimated Wait Time +staff.circ.utils.potential_copies=Potential Copies Available +staff.circ.utils.queue_position=Queue Position +staff.circ.utils.total_holds=Total Number of Holds staff.circ.checkin.hold_capture=Hold Capture staff.circ.checkin.check_in.tab=Item Check In staff.circ.checkin.error=Check In Failed (in circ.util.checkin) (%1$s): diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index bfb75a45ce..b59b4c2dbd 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -69,13 +69,17 @@ patron.holds.prototype = { if (typeof blob.ilsevent != 'undefined') throw(blob); row.my.ahr = blob.hold; row.my.status = blob.status; - row.my.ahr.status( blob.status ); + row.my.ahr.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; + row.my.total_holds = blob.total_holds; + row.my.queue_position = blob.queue_position; + row.my.potential_copies = blob.potential_copies; + row.my.estimated_wait = blob.estimated_wait; var copy_id = row.my.ahr.current_copy(); if (typeof copy_id == 'object') { @@ -92,7 +96,7 @@ patron.holds.prototype = { params.row_node.setAttribute('retrieve_id', js2JSON({ 'copy_id':copy_id, - 'barcode':row.my.acp ? row.my.acp.barcode() : null, + 'barcode':row.my.acp ? row.my.acp.barcode() : null, 'id':row.my.ahr.id(), 'type':row.my.ahr.hold_type(), 'target':row.my.ahr.target(), -- 2.11.0