[open-ils-commits] [GIT] Evergreen ILS branch rel_3_5 updated. eae8919fe607392bbb40d6741f60b910032408e0

Evergreen Git git at git.evergreen-ils.org
Wed Jul 22 13:50:05 EDT 2020


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, rel_3_5 has been updated
       via  eae8919fe607392bbb40d6741f60b910032408e0 (commit)
      from  3d058276eee938efe7bb7090a050ae5858fc22bb (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 eae8919fe607392bbb40d6741f60b910032408e0
Author: Josh Stompro <stompro at stompro.org>
Date:   Mon Feb 3 13:42:08 2020 -0600

    LP#1754387 - User Buckets - Pending Users Enhancement
    
    It wasn't possible to load more than 100 users from a barcode file import in
    user buckets because of two issues.  The pager was limited to only showing 100
    barcodes at a time, and moving any users from the pending list would clear the
    pending list.
    
    Here is a branch that makes the following changes.
    
    1. Sets the default number of items to 100 and allows choosing the
      500,1000,10000 options for the pager.
    
    2. When moving users from pending to a bucket, only removes the moved users
      from the pending list.  This allows the user to move a larger number of
      users to a bucket from pending, a batch at a time.
    
    Testing Plan:
    
    Before Changes:
    
    1. Load a file with 110 patron barcodes in the User Buckets, Pending Users interface.
    2. See that the pager only allows a max of 100 for the page size.
    3. Move one user to a bucket and note that the pending list gets cleared.
    
    After Changes:
    
    1. Load a file with 110 patron barcodes.
    2. See that the pager allows for picking larger page sizes.
    3. Move one user to a bucket, and note that the pending list removes just that one user.
    
    Another way to see the changes is to pick a pager size of 25, and select all the
    entries.  Then move them to a bucket and see that you can continue to move
    batches of 25 until you have moved all the pending users.
    
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: Gina Monti <gmonti at biblio.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/bucket/t_pending.tt2 b/Open-ILS/src/templates/staff/circ/patron/bucket/t_pending.tt2
index 2df627e8fe..39d1e1e587 100644
--- a/Open-ILS/src/templates/staff/circ/patron/bucket/t_pending.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/bucket/t_pending.tt2
@@ -25,7 +25,8 @@
 
 <eg-grid
   ng-hide="forbidden"
-  features="-sort,-multisort,-display"
+  features="-sort,-multisort,-display,allowAll"
+  page-size=100
   id-field="id"
   idl-class="au"
   auto-fields="true"
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
index 70025b5b62..e391874aa6 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
@@ -89,6 +89,7 @@ function($scope,  $location,  $q,  $timeout,  $uibModal,
                 var item = new egCore.idl.cubi();
                 item.bucket(bucketSvc.currentBucket.id());
                 item.target_user(rec.id);
+                $scope.removeFromPendingList(rec.id);
                 egCore.net.request(
                     'open-ils.actor',
                     'open-ils.actor.container.item.create', 
@@ -104,7 +105,8 @@ function($scope,  $location,  $q,  $timeout,  $uibModal,
                 });
             }
         );
-        $scope.resetPendingList();
+        //re-draw the pending list
+        $scope.resetPendingListQuery();
     }
 
     $scope.openCreateBucketDialog = function() {
@@ -265,7 +267,21 @@ function($scope,  $routeParams,  bucketSvc , egGridDataProvider,   egCore , ngTo
     }
 
     $scope.$parent.resetPendingList = $scope.resetPendingList;
-    
+
+    //remove entry from PendingList
+    $scope.removeFromPendingList = function(usr) {
+        const index = bucketSvc.pendingList.indexOf(usr);
+        if (index > -1) {
+            bucketSvc.pendingList.splice(index,1);
+        }
+    }
+    $scope.$parent.removeFromPendingList = $scope.removeFromPendingList;
+
+    $scope.resetPendingListQuery = function() {
+        $scope.gridControls.setQuery({id : bucketSvc.pendingList});
+    }
+    $scope.$parent.resetPendingListQuery = $scope.resetPendingListQuery;
+
     if ($routeParams.id && 
         (!bucketSvc.currentBucket || 
             bucketSvc.currentBucket.id() != $routeParams.id)) {

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

Summary of changes:
 .../templates/staff/circ/patron/bucket/t_pending.tt2 |  3 ++-
 .../js/ui/default/staff/circ/patron/bucket/app.js    | 20 ++++++++++++++++++--
 2 files changed, 20 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list