From fca6f0138089b5dfb3c743442852b8cdf5bd7237 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 27 Feb 2015 00:20:24 -0500 Subject: [PATCH] webstaff: wire the date filter into the payments grid in billing xact history Signed-off-by: Jason Etheridge Signed-off-by: Galen Charlton --- .../web/js/ui/default/staff/circ/patron/bills.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index 1546edcd61..2c7d18d419 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -708,6 +708,14 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location ['$scope','$q','egCore','patronSvc','billSvc','$location', function($scope, $q , egCore , patronSvc , billSvc , $location) { + // generate a grid query with the current date widget values. + function current_grid_query() { + return { + 'payment_ts' : {between : $scope.date_range()}, + 'xact.usr' : billSvc.userId + } + } + $scope.gridControls = { selectedItems : function(){return []}, activateItem : function(item) { @@ -716,12 +724,12 @@ function($scope, $q , egCore , patronSvc , billSvc , $location) { setSort : function() { return [{'payment_ts' : 'DESC'}, 'id']; }, - setQuery : function() { - return { - 'payment_ts' : {between : $scope.date_range()}, - 'xact.usr' : billSvc.userId - } - } + setQuery : current_grid_query + } + + $scope.actions.apply_date_range = function() { + // tells the grid to re-draw itself with the new query + $scope.gridControls.setQuery(current_grid_query()); } $scope.showFullDetails = function(all) { -- 2.11.0