[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. c87d248a028bb8f6d0722a87b8ef165b9a130e7d
Evergreen Git
git at git.evergreen-ils.org
Fri Nov 10 16:25:32 EST 2017
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_0 has been updated
via c87d248a028bb8f6d0722a87b8ef165b9a130e7d (commit)
via abfdec795107c01cd96273f8a279eea5603d00c9 (commit)
from 14a567ab209c4d7e95dcde5b334fd8a71fba23bf (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 c87d248a028bb8f6d0722a87b8ef165b9a130e7d
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Fri Nov 10 16:43:29 2017 -0500
LP#1723498: fix display of count of duplicate patrons
This patch fixes an issue where the patron registration
form's alert for duplicate phone numbers did not display
the count of matching records. (This was caused by code
that was expecting a string to be passed by reference
when it's passed by value in JavaScript).
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index ce365ab..f93fbfa 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -45,19 +45,19 @@
<a target="_blank"
href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.day_phone}}">
[% l('[_1] patron(s) with same phone',
- '{{dupe_counts.phone}}') %]</a>
+ '{{dupe_counts.day_phone}}') %]</a>
</div>
<div class="alert alert-danger" ng-show="dupe_counts.evening_phone">
<a target="_blank"
href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.evening_phone}}">
[% l('[_1] patron(s) with same phone',
- '{{dupe_counts.phone}}') %]</a>
+ '{{dupe_counts.evening_phone}}') %]</a>
</div>
<div class="alert alert-danger" ng-show="dupe_counts.other_phone">
<a target="_blank"
href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.other_phone}}">
[% l('[_1] patron(s) with same phone',
- '{{dupe_counts.phone}}') %]</a>
+ '{{dupe_counts.other_phone}}') %]</a>
</div>
<div class="alert alert-danger" ng-show="dupe_counts.address">
<a target="_blank"
commit abfdec795107c01cd96273f8a279eea5603d00c9
Author: Bill Erickson <berickxx at gmail.com>
Date: Thu Nov 9 10:46:50 2017 -0500
LP#1723498 Patron reg/edit dupe search repairs
Avoid clobbering duplicate patron search links by managing search URLs
individually by search type and displaying a search link per search
type.
This change includes an improvement over the XUL version in that a link
will be displayed per matching phone number so each can be searched,
instead of only searching the most recently entered phone number.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Terra McCanna <tmccanna at georgialibraries.org>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index ce8da85..ce365ab 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -25,31 +25,43 @@
[%# dupe_search_encoded is uri escaped in the JS %]
<div class="alert alert-danger" ng-show="dupe_counts.name">
<a target="_blank"
- href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}&inactive=1">
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.name}}&inactive=1">
[% l('[_1] patron(s) with same name', '{{dupe_counts.name}}') %]
</a>
</div>
<div class="alert alert-danger" ng-show="dupe_counts.email">
<a target="_blank"
- href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.email}}">
[% l('[_1] patron(s) with same email',
'{{dupe_counts.email}}') %]</a>
</div>
<div class="alert alert-danger" ng-show="dupe_counts.ident">
<a target="_blank"
- href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.ident}}">
[% l('[_1] patron(s) with same identification',
'{{dupe_counts.ident}}') %]</a>
</div>
- <div class="alert alert-danger" ng-show="dupe_counts.phone">
+ <div class="alert alert-danger" ng-show="dupe_counts.day_phone">
<a target="_blank"
- href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.day_phone}}">
+ [% l('[_1] patron(s) with same phone',
+ '{{dupe_counts.phone}}') %]</a>
+ </div>
+ <div class="alert alert-danger" ng-show="dupe_counts.evening_phone">
+ <a target="_blank"
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.evening_phone}}">
+ [% l('[_1] patron(s) with same phone',
+ '{{dupe_counts.phone}}') %]</a>
+ </div>
+ <div class="alert alert-danger" ng-show="dupe_counts.other_phone">
+ <a target="_blank"
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.other_phone}}">
[% l('[_1] patron(s) with same phone',
'{{dupe_counts.phone}}') %]</a>
</div>
<div class="alert alert-danger" ng-show="dupe_counts.address">
<a target="_blank"
- href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}" >
+ href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.address}}" >
[% l('[_1] patron(s) with same address',
'{{dupe_counts.address}}') %]</a>
</div>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index f353f96..cdf2875 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -553,6 +553,8 @@ angular.module('egCoreMod')
console.log('Dupe search called with "'+ type +'" and value '+ value);
+ if (type.match(/phone/)) type = 'phone'; // day_phone, etc.
+
switch (type) {
case 'name':
@@ -1644,15 +1646,19 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
}
$scope.dupe_value_changed = function(type, value) {
+ if (!$scope.dupe_search_encoded)
+ $scope.dupe_search_encoded = {};
+
$scope.dupe_counts[type] = 0;
+
patronRegSvc.dupe_patron_search($scope.patron, type, value)
.then(function(res) {
$scope.dupe_counts[type] = res.count;
if (res.count) {
- $scope.dupe_search_encoded =
+ $scope.dupe_search_encoded[type] =
encodeURIComponent(js2JSON(res.search));
} else {
- $scope.dupe_search_encoded = '';
+ $scope.dupe_search_encoded[type] = '';
}
});
}
@@ -1727,7 +1733,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
}
case 'evening_phone' :
case 'other_phone' :
- $scope.dupe_value_changed('phone', value);
+ $scope.dupe_value_changed(field_name, value);
break;
case 'ident_value':
-----------------------------------------------------------------------
Summary of changes:
.../src/templates/staff/circ/patron/t_edit.tt2 | 26 ++++++++++++++-----
.../web/js/ui/default/staff/circ/patron/regctl.js | 12 +++++++--
2 files changed, 28 insertions(+), 10 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list