From: Bill Erickson Date: Mon, 4 Feb 2013 18:49:19 +0000 (-0500) Subject: selfcheck checkin UI X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d2b7975c2c93aeab3a9c91213497a0e82995fd22;p=evergreen%2Fequinox.git selfcheck checkin UI Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js index de859a9a76..73840a1b04 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -836,7 +836,7 @@ SelfCheckManager.prototype.updateCircSummary = function(increment) { if(increment) { // local checkout occurred. Add to the total and the session. - this.circSummary.total += 1; // TODO += increment for checkins + this.circSummary.total += increment; this.circSummary.session += 1; } @@ -1043,10 +1043,9 @@ SelfCheckManager.prototype.checkinCopy = function(args) { { async : true, params : [ this.authtoken, { - patron_id : this.patron.id(), copy_barcode : args.barcode, - void_overdues : args.void_overdues, - backdate : args.backdate + backdate : args.backdate, + void_overdues : args.void_overdues } ], oncomplete : function(r) { @@ -1177,14 +1176,17 @@ SelfCheckManager.prototype.displayCheckin = function(result, outcomeText) { var date = dojo.date.stamp.fromISOString(circ.due_date()); this.byName(row, 'due_date').innerHTML = dojo.date.locale.format(date, {selector : 'date'}); + + // if a patron is loaded and we just checked an item + // in for this patron, decrement the items-out count by 1 + if (this.patron && this.patron.id() == circ.usr()) + this.updateCircSummary(-1); } // put new circs at the top of the list var tbody = this.checkinTbody; tbody.insertBefore(row, tbody.getElementsByTagName('tr')[0]); - - this.updateCircSummary(); } SelfCheckManager.prototype.handleCheckinResult = function(item, result) { @@ -1269,7 +1271,7 @@ SelfCheckManager.prototype.handleXactResult = function(action, item, result) { this.updateHoldsSummary(); } - this.updateCircSummary(true); + this.updateCircSummary(1); } else if(action == 'renew') {