[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 4d6fa4830abc567e0c9f05877301ce3ed3c654b6
Evergreen Git
git at git.evergreen-ils.org
Fri Oct 4 11:01:45 EDT 2019
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_1 has been updated
via 4d6fa4830abc567e0c9f05877301ce3ed3c654b6 (commit)
from 61051796e8b00c4e94766c30f82fda54c592bc3c (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 4d6fa4830abc567e0c9f05877301ce3ed3c654b6
Author: Dan Briem <dbriem at wlsmail.org>
Date: Sat Aug 24 14:44:01 2019 -0400
LP#1841089 Apply button in Patron Bill History screen is in confusing location
It's possible to miss the apply button for the date range in bill history
because it's located before the datepickers. The interface also allows
invalid date ranges.
This removes the apply button and watches the start and finish dates in the
bill history and payment history controllers. If it's not first init and they
are valid date objects in a valid date range, the grid refreshes with the new
date range query. If start > finish they are set equal to each other to force
a valid range.
To test:
1. Apply patch
2. Bring up a patron with bills and payments (or add bills and payments)
3. Under the Bills tab click History
4. Change the date range and observe that the grid refreshes
5. Try to set the start date past the finish date and vice versa
Signed-off-by: Dan Briem <dbriem at wlsmail.org>
Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_bill_history.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_bill_history.tt2
index d9c454397d..77cd4f9a2f 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_bill_history.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_bill_history.tt2
@@ -25,10 +25,6 @@
<label>[% l('Selected Paid:') %]</label>
<span>{{totals.selected_paid() | currency}}</span>
</div>
- <div class="col-md-1">
- <span><button class="btn btn-default"
- ng-click="actions.apply_date_range()">[% l('Apply') %]</button></span>
- </div>
<div class="col-md-4 flex-row padded">
<label>[% l('Start Date:') %]</label>
<div><eg-date-input ng-model="dates.xact_start"></eg-date-input></div>
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 091168d2ce..24698a2575 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
@@ -1000,6 +1000,25 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location
setQuery : current_grid_query
}
+ $scope.$watch('dates.xact_start', function(new_date, old_date) {
+ if (new_date !== old_date && new_date) {
+ if (new_date.getTime() > $scope.dates.xact_finish.getTime()) {
+ $scope.dates.xact_finish = new_date;
+ } else {
+ $scope.actions.apply_date_range();
+ }
+ }
+ });
+ $scope.$watch('dates.xact_finish', function(new_date, old_date) {
+ if (new_date !== old_date && new_date) {
+ if (new_date.getTime() < $scope.dates.xact_start.getTime()) {
+ $scope.dates.xact_start = new_date;
+ } else {
+ $scope.actions.apply_date_range();
+ }
+ }
+ });
+
$scope.actions.apply_date_range = function() {
// tells the grid to re-draw itself with the new query
$scope.gridControls.setQuery(current_grid_query());
@@ -1137,6 +1156,25 @@ function($scope, $q , egCore , patronSvc , billSvc , $location) {
setQuery : current_grid_query
}
+ $scope.$watch('dates.xact_start', function(new_date, old_date) {
+ if (new_date !== old_date && new_date) {
+ if (new_date.getTime() > $scope.dates.xact_finish.getTime()) {
+ $scope.dates.xact_finish = new_date;
+ } else {
+ $scope.actions.apply_date_range();
+ }
+ }
+ });
+ $scope.$watch('dates.xact_finish', function(new_date, old_date) {
+ if (new_date !== old_date && new_date) {
+ if (new_date.getTime() < $scope.dates.xact_start.getTime()) {
+ $scope.dates.xact_start = new_date;
+ } else {
+ $scope.actions.apply_date_range();
+ }
+ }
+ });
+
$scope.actions.apply_date_range = function() {
// tells the grid to re-draw itself with the new query
$scope.gridControls.setQuery(current_grid_query());
-----------------------------------------------------------------------
Summary of changes:
.../templates/staff/circ/patron/t_bill_history.tt2 | 4 ---
.../web/js/ui/default/staff/circ/patron/bills.js | 38 ++++++++++++++++++++++
2 files changed, 38 insertions(+), 4 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list