From bca91c88155001a1ce99fccdc7427e1cda68174f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 24 Apr 2019 09:19:40 -0400 Subject: [PATCH] LP1642036 Group member detail grid query repair Teach the grid to automatically use the current version of the grid query in group member details lookup, since the query changes as patron's change and is sometimes applied after the grid has already absorbed the setQuery function. Signed-off-by: Bill Erickson Signed-off-by: John Amundson Signed-off-by: Jason Stephenson --- Open-ILS/web/js/ui/default/staff/circ/patron/app.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index 24aa858f49..0d8f25fb21 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -1067,6 +1067,15 @@ function($scope, $routeParams , $q , $window , $timeout, $location , egCore , }, setSort : function() { return ['create_date']; + }, + watchQuery: function() { + if (patronSvc.current) { + return { + usrgroup : patronSvc.current.usrgroup(), + deleted : 'f' + }; + } + return null; } } @@ -1076,11 +1085,6 @@ function($scope, $routeParams , $q , $window , $timeout, $location , egCore , // grid query. if (redirect) return; // let initTab() fetch the user first so we can know the usrgroup - - $timeout(grid.setQuery({ - usrgroup : patronSvc.current.usrgroup(), - deleted : 'f' - }), 500); // wrap in timeout to try to prevent race condition LP1642036 $scope.totals.owed = patronSvc.patron_stats.fines.group_balance_owed; }); -- 2.11.0