LP#1668351 Patrons with neg. balance selection repair
authorBill Erickson <berickxx@gmail.com>
Mon, 27 Feb 2017 19:41:00 +0000 (14:41 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 4 Mar 2017 03:37:38 +0000 (22:37 -0500)
Selecting a row in the webstaff Patrons With Negative Balances grid now
only selects that patron, instead of all patrons.

This was the result of the grid not having a correctly set unique
identifier attribute.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>

Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js

index 43fa878..d8acde1 100644 (file)
@@ -20,7 +20,11 @@ function($scope , $q , $timeout , $location , $window , egCore , egGridDataProvi
             'open-ils.actor',
             'open-ils.actor.users.negative_balance',
             egCore.auth.token(), $scope.context_org.id())
-        .then(deferred.resolve, null, deferred.notify);
+        .then(deferred.resolve, null, function(blob) {
+            // Give the grid a top-level identifier field
+            blob.usr_id = blob.usr.id();
+            deferred.notify(blob)
+        });
 
         return deferred.promise;
     }