From: Bill Erickson Date: Thu, 7 Feb 2013 15:45:17 +0000 (-0500) Subject: selfcheck staff mode : staff mode checkout auto-override / transit abort X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a33100339;p=evergreen%2Fequinox.git selfcheck staff mode : staff mode checkout auto-override / transit abort 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 5d6f7a03a7..0f3eb572d4 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -589,7 +589,10 @@ SelfCheckManager.prototype.drawCircPage = function() { var self = this; this.updateScanBox({ msg : dojo.string.substitute(localeStrings.CHECKOUT_PROMPT), - handler : function(barcode) { self.checkout(barcode); } + handler : function(barcode) { + // staffMode jumps straight to override + self.checkout(barcode, self.staffMode); + } }); if(!this.circTemplate) @@ -1339,6 +1342,20 @@ SelfCheckManager.prototype.handleXactResult = function(action, item, result) { } else { + + if (this.staffMode) { + // in staff mode we override everything. Transits, however, + // can't be overridden. They must first be aborted and checked in. + + if(!result.length) result = [result]; + + for(var i = 0; i < result.length; i++) { + if(result[i].textcode == 'COPY_IN_TRANSIT') { + if(this.inlineCheckinCopy(item, true)) + return { override : true }; + } + } + } if(overrideEvents && overrideEvents.length) {