From: phasefx Date: Wed, 2 Jan 2008 15:33:48 +0000 (+0000) Subject: disallow editing the pickup locations for intransit or ready for pickup holds X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c8b78ae706829b7071e2e0c406b321dbb956cf33;p=Evergreen.git disallow editing the pickup locations for intransit or ready for pickup holds git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_1@8292 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 463b393f20..53d2d859ec 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -54,6 +54,7 @@ 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.acp = blob.copy; row.my.acn = blob.volume; row.my.mvr = blob.mvr; @@ -445,6 +446,17 @@ patron.holds.prototype = { function() { try { JSAN.use('util.widgets'); JSAN.use('util.functional'); + + var deny_edit_because_of_transit = false; + for (var i = 0; i < obj.retrieve_ids.length; i++) { + var hold = obj.holds_map[ obj.retrieve_ids[i].id ]; + if (hold.status() > 2 /* Which means holds that are In-Transit or Ready for Pickup */) deny_edit_because_of_transit = true; + } + if (deny_edit_because_of_transit) { + alert('You may not edit the pickup library for holds that are in-transit or ready for pickup.'); + return; + } + var list = util.functional.map_list( obj.data.list.aou, function(o) {