From 7fafcd803eadc2fc9a35076565810e2588876dd9 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 23 Jun 2014 17:27:40 -0400 Subject: [PATCH] starting checkin mods Signed-off-by: Bill Erickson --- .../src/templates/staff/circ/checkin/index.tt2 | 78 ++++++++++++++-------- .../web/js/ui/default/staff/circ/checkin/app.js | 12 ++-- .../js/ui/default/staff/circ/patron/checkout.js | 3 +- .../web/js/ui/default/staff/circ/services/circ.js | 4 ++ Open-ILS/web/js/ui/default/staff/services/hatch.js | 2 +- 5 files changed, 64 insertions(+), 35 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/checkin/index.tt2 b/Open-ILS/src/templates/staff/circ/checkin/index.tt2 index c7d6cf9320..5fcf57f48c 100644 --- a/Open-ILS/src/templates/staff/circ/checkin/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/checkin/index.tt2 @@ -58,33 +58,57 @@ [% INCLUDE 'staff/circ/checkin/t_checkin_table.tt2' %] -
-
-
- -
-
- -
-
-
- -
-
-
- -
-
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+ + +
+
+
[% END %] diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index 0c2205cac7..cacbf94127 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -30,9 +30,8 @@ function($scope , $q , egCore , checkinSvc , egGridDataProvider , egCirc) { $scope.focusMe = true; $scope.checkins = checkinSvc.checkins; $scope.checkinArgs = {backdate : new Date()} - - $scope.using_hatch = egCore.hatchAvailable || - egCore.hatch.getLocalItem('eg.hatch.required'); + $scope.using_hatch = egCore.hatch.usingHatch(); + $scope.modifiers = {}; var today = new Date(); @@ -67,9 +66,12 @@ function($scope , $q , egCore , checkinSvc , egGridDataProvider , egCirc) { delete params.backdate; } - var options = {check_barcode : $scope.strict_barcode}; + var options = { + check_barcode : $scope.strict_barcode, + no_precat_alert : $scope.modifiers.no_precat_alert + }; - egCirc.checkin(angular.copy(params, options)) + egCirc.checkin(angular.copy(params), options) .then(function(final_resp) { final_resp.evt.index = checkinSvc.checkins.length; final_resp.evt.copy_barcode = params.copy_barcode; diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index d4b79282d7..ffa4347359 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -32,8 +32,7 @@ function($scope , $q , $modal , $routeParams , egCore , egUser , patronSvc , ); } - $scope.using_hatch = egCore.hatchAvailable || - egCore.hatch.getLocalItem('eg.hatch.required'); + $scope.using_hatch = egCore.hatch.usingHatch(); // avoid multiple, in-flight attempts on the same barcode var pending_barcodes = {}; diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 1b370aff96..8606a7b337 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -518,6 +518,8 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog) { // track the barcode regardless of whether it refers to a copy evt.copy_barcode = params.copy_barcode; + console.debug('checkin event ' + evt.textcode); + switch (evt.textcode) { case 'SUCCESS': case 'NO_CHANGE': @@ -548,6 +550,8 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog) { .result.then(function() {return final_resp}); case 'ITEM_NOT_CATALOGED': + if (options.no_precat_alert) + return $q.when(final_resp); return egAlertDialog.open( egCore.strings.PRECAT_CHECKIN_MSG, params) .result.then(function() {return final_resp}); diff --git a/Open-ILS/web/js/ui/default/staff/services/hatch.js b/Open-ILS/web/js/ui/default/staff/services/hatch.js index f679dc55fd..9e41d914f2 100644 --- a/Open-ILS/web/js/ui/default/staff/services/hatch.js +++ b/Open-ILS/web/js/ui/default/staff/services/hatch.js @@ -120,7 +120,7 @@ angular.module('egCoreMod') // Returns true if Hatch is required or if we are currently // communicating with the Hatch service. service.usingHatch = function() { - return egCore.hatchAvailable || service.hatchRequired(); + return service.hatchAvailable || service.hatchRequired(); } // Returns true if this browser (via localStorage) is -- 2.11.0