[open-ils-commits] r14080 - trunk/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 21 23:51:52 EDT 2009
Author: phasefx
Date: 2009-09-21 23:51:49 -0400 (Mon, 21 Sep 2009)
New Revision: 14080
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
trunk/Open-ILS/xul/staff_client/server/patron/util.js
Log:
after applying penalty, fetch new patron with .standing_penalties. The constructed/fake penalty wasn't good enough for further action with pcrud, only for display
Modified: trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js 2009-09-22 03:11:24 UTC (rev 14079)
+++ trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js 2009-09-22 03:51:49 UTC (rev 14080)
@@ -179,7 +179,11 @@
);
} else {
penalty.id(req);
- xulG.patron.standing_penalties( xulG.patron.standing_penalties().concat( penalty ) );
+ JSAN.use('patron.util'); JSAN.use('util.functional');
+ //xulG.patron.standing_penalties( xulG.patron.standing_penalties().concat( penalty ) ); // Not good enough for pcrud
+ xulG.patron = patron.util.retrieve_fleshed_au_via_id( ses(), xulG.patron.id() ); // So get the real deal instead
+ penalty = util.functional.find_list( xulG.patron.standing_penalties(), function(o) { return o.id() == req; } );
+
var row_params = {
'row' : {
'my' : {
@@ -338,6 +342,7 @@
for (var i = 0; i < ids.length; i++) {
outstanding_requests++;
var penalty = util.functional.find_list( xulG.patron.standing_penalties(), function(o) { return o.id() == ids[i]; } );
+alert(js2JSON(penalty));
penalty.ischanged( 1 );
penalty.stop_date( util.date.formatted_date(new Date(),'%F') );
dojo.require('openils.PermaCrud');
Modified: trunk/Open-ILS/xul/staff_client/server/patron/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/util.js 2009-09-22 03:11:24 UTC (rev 14079)
+++ trunk/Open-ILS/xul/staff_client/server/patron/util.js 2009-09-22 03:51:49 UTC (rev 14080)
@@ -583,7 +583,7 @@
JSAN.use('util.network');
var network = new util.network();
var patron_obj = network.simple_request(
- 'FM_AU_FLESHED_RETRIEVE_VIA_ID',
+ 'FM_AU_FLESHED_RETRIEVE_VIA_ID.authoritative',
[ session, id ]
);
patron.util.set_penalty_css(patron_obj);
More information about the open-ils-commits
mailing list