From: Bill Erickson Date: Wed, 24 Apr 2019 13:19:40 +0000 (-0400) Subject: LP1642036 Group member detail grid query repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b7a8f5de1821ed6ad16d5b5b66e1198e401f738a;p=evergreen%2Fpines.git 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 --- 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 d007257e4f..a886195050 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 @@ -1066,6 +1066,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; } } @@ -1075,11 +1084,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 - - grid.setQuery({ - usrgroup : patronSvc.current.usrgroup(), - deleted : 'f' - }); $scope.totals.owed = patronSvc.patron_stats.fines.group_balance_owed; });