From: phasefx Date: Mon, 7 Aug 2006 21:37:42 +0000 (+0000) Subject: transit columns for holds.. Available On X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d34793fbabe20deb47a53888a466156994a916cf;p=evergreen%2Fpines.git transit columns for holds.. Available On git-svn-id: svn://svn.open-ils.org/ILS/trunk@5351 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 b41c63db9e..267903f713 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -47,6 +47,7 @@ const api = { 'FM_AHR_CANCEL' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.cancel' }, 'FM_AHR_UPDATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.update' }, 'FM_AHR_RESET' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.reset' }, + 'FM_AHR_STATUS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.status.retrieve' }, 'FM_AIHU_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.in_house_use.create' }, 'FM_ANCC_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.non_cataloged_circulation.retrieve' }, 'FM_ANCC_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.open_non_cataloged_circulation.user' }, diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index fc88fc7724..a333038509 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -509,12 +509,16 @@ circ.util.hold_columns = function(modify,params) { 'render' : 'my.ahr.request_time().toString().substr(0,10)' }, { + 'persist' : 'hidden width', 'id' : 'available_time', 'label' : 'Available On', 'flex' : 1, + 'primary' : false, 'hidden' : false, 'render' : 'my.ahr.transit() ? ( my.ahr.transit().dest_recv_time() ? my.ahr.transit().dest_recv_time().toString().substr(0,10) : "") : ( my.ahr.capture_time() ? my.ahr.capture_time().toString().substr(0,10) : "" )', + }, + { 'persist' : 'hidden width', 'id' : 'capture_time', 'label' : getString('staff.ahr_capture_time_label'), 'flex' : 1, - 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.capture_time()' + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.capture_time() ? my.ahr.capture_time().toString().substr(0,10) : "???"' }, { 'persist' : 'hidden width', 'id' : 'status', 'label' : getString('staff.ahr_status_label'), 'flex' : 1, - 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.status()' + 'primary' : false, 'hidden' : false, 'render' : 'switch(my.status) { case 1: case "1": "Waiting for copy"; break; case 2: case "2": "Waiting for capture"; break; case 3: case "3": "In-Transit"; break; case 4: case "4" : "Ready for pickup"; break; default: my.status; break;}' }, { 'persist' : 'hidden width', 'id' : 'hold_type', 'label' : getString('staff.ahr_hold_type_label'), 'flex' : 0, @@ -606,6 +610,22 @@ circ.util.hold_columns = function(modify,params) { 'persist' : 'hidden width', 'id' : 'tcn', 'label' : 'TCN', 'flex' : 1, 'primary' : false, 'hidden' : true, 'render' : 'my.mvr.tcn();' }, + { + 'persist' : 'hidden width', 'id' : 'transit_source', 'label' : 'Transit Source', 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.transit() ? obj.data.hash.aou[ my.ahr.transit().source() ].shortname() : ""' + }, + { + 'persist' : 'hidden width', 'id' : 'transit_source_send_time', 'label' : 'Transitted On', 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.transit() ? my.ahr.transit().source_send_time() : ""' + }, + { + 'persist' : 'hidden width', 'id' : 'transit_dest_lib', 'label' : 'Transit Destination', 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.transit() ? obj.data.hash.aou[ my.ahr.transit().dest() ].shortname() : ""' + }, + { + 'persist' : 'hidden width', 'id' : 'transit_dest_recv_time', 'label' : 'Transit Completed On', 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.transit() ? my.ahr.transit().dest_recv_time() : ""' + }, ]; diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 6a3494a16c..eaed2e2da3 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -28,9 +28,9 @@ patron.holds.prototype = { 'title' : { 'hidden' : false, 'flex' : '3' }, 'request_time' : { 'hidden' : false }, 'pickup_lib_shortname' : { 'hidden' : false }, - 'hold_type' : { 'hidden' : false }, - 'current_copy' : { 'hidden' : false }, - 'capture_time' : { 'hidden' : false }, + 'hold_type' : { 'hidden' : true }, + 'current_copy' : { 'hidden' : true }, + 'capture_time' : { 'hidden' : true }, } ); @@ -42,6 +42,8 @@ patron.holds.prototype = { 'retrieve_row' : function(params) { var row = params.row; try { + var status_robj = obj.network.simple_request('FM_AHR_STATUS',[ ses(), row.my.ahr.id() ]); + row.my.status = status_robj; if (row.my.ahr.current_copy()) { row.my.acp = obj.network.simple_request( 'FM_ACP_RETRIEVE', [ row.my.ahr.current_copy() ]); }