[open-ils-commits] [GIT] Evergreen ILS branch master updated. 40d8ce3691abb3549f95ecdc92cd139c3c86805c

Evergreen Git git at git.evergreen-ils.org
Mon Sep 18 15:16:40 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  40d8ce3691abb3549f95ecdc92cd139c3c86805c (commit)
      from  d705d616ef0f6e07c803a8d16e30a8f9ba9f24c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 40d8ce3691abb3549f95ecdc92cd139c3c86805c
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Sep 15 15:08:47 2017 -0400

    LP#1537233 Copy bucket handles mis-scans, improve focus
    
    Show warning message to user when an unknown barcode is scanned in the
    copy bucket pending list UI.  Also, after a barcode failure occurs, select
    the barcode text (instead of clearing it) so it can be seen and easily
    replaced, consistent with the item status UI.
    
    After successful scan, clear and re-focus the barcode input box.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2 b/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2
index dcd0815..6391625 100644
--- a/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2
+++ b/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2
@@ -3,13 +3,21 @@
     <form ng-submit="search()">
       <div class="input-group">
         <span class="input-group-addon">[% l('Scan Item') %]</span>
-        <input type="text" class="form-control" focus-me="focusMe"
+        <input type="text" class="form-control" select-me="context.selectPendingBC"
         ng-model="bucketSvc.barcodeString" placeholder="[% l('Barcode...') %]">
       </div>
     </form>
   </div>
 </div>
 
+<div class="row pad-vert" ng-if="context.itemNotFound">
+  <div class="col-md-6">
+    <div class="alert alert-danger">
+      [% l('Item Not Found') %]
+    </div>
+  </div>
+</div>
+
 <br/>
 
 <eg-grid
diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js
index d99e70e..151fe91 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js
@@ -372,6 +372,11 @@ function($scope,  $location,  $q,  $timeout,  $uibModal,
 function($scope,  $routeParams,  bucketSvc , egGridDataProvider,   egCore) {
     $scope.setTab('pending');
 
+    $scope.context = {
+        copyNotFound : false,
+        selectPendingBC : true
+    };
+
     var query;
     $scope.gridControls = {
         setQuery : function(q) {
@@ -379,19 +384,32 @@ function($scope,  $routeParams,  bucketSvc , egGridDataProvider,   egCore) {
                 return {id : bucketSvc.pendingList};
             else
             return null;
+        },
+        allItemsRetrieved : function() {
+            $scope.context.selectPendingBC = true;
         }
     }
 
     $scope.search = function() {
         bucketSvc.barcodeRecords = [];
+        $scope.context.itemNotFound = false;
+
+        // clear selection so re-selecting can have an effect
+        $scope.context.selectPendingBC = false;
 
         egCore.pcrud.search(
             'acp',
             {barcode : bucketSvc.barcodeString, deleted : 'f'},
             {}
-        ).then(null, null, function(copy) {
-            bucketSvc.pendingList.push(copy.id());
-            $scope.gridControls.setQuery({id : bucketSvc.pendingList});
+        ).then(function(copy) {
+            if (copy) {
+                bucketSvc.pendingList.push(copy.id());
+                $scope.gridControls.setQuery({id : bucketSvc.pendingList});
+                bucketSvc.barcodeString = ''; // clear form on valid copy
+            } else {
+                $scope.context.itemNotFound = true;
+                $scope.context.selectPendingBC = true;
+            }
         });
     }
 

-----------------------------------------------------------------------

Summary of changes:
 .../templates/staff/cat/bucket/copy/t_pending.tt2  |   10 +++++++-
 .../web/js/ui/default/staff/cat/bucket/copy/app.js |   24 +++++++++++++++++--
 2 files changed, 30 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list