Skip to content

Commit 2e72600

Browse files
HitScantmccanna
authored andcommitted
LP2046000: Check for staging dupes and alerts
When loading staged users run the duplicate field checks for all relevant fields and check the addresses for any alerts. Release-Note: Check for duplicate values and address alerts when loading staged users. Signed-off-by: Jason Boyer <[email protected]> Signed-off-by: Galen Charlton <[email protected]> Signed-off-by: Terran McCanna <[email protected]>
1 parent baa9f5d commit 2e72600

File tree

1 file changed

+17
-0
lines changed
  • Open-ILS/web/js/ui/default/staff/circ/patron

1 file changed

+17
-0
lines changed

Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,23 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
15091509
if ($scope.org_settings['ui.patron.edit.guardian_required_for_juv']) {
15101510
add_juv_watcher();
15111511
}
1512+
1513+
// Check for duplicate values in staged users.
1514+
if (prs.stage_user) {
1515+
if (patron.first_given_name) { $scope.dupe_value_changed('name', patron.first_given_name); }
1516+
if (patron.family_name) { $scope.dupe_value_changed('name', patron.familiy_name); }
1517+
if (patron.email) { $scope.dupe_value_changed('email', patron.email); }
1518+
if (patron.day_phone) { $scope.dupe_value_changed('day_phone', patron.day_phone); }
1519+
if (patron.evening_phone) { $scope.dupe_value_changed('evening_phone', patron.evening_phone); }
1520+
1521+
patron.addresses.forEach(function (addr) {
1522+
$scope.dupe_value_changed('address', addr);
1523+
address_alert(addr);
1524+
});
1525+
if (patron.usrname) {
1526+
prs.check_dupe_username(patron.usrname).then((result) => $scope.dupe_username = Boolean(result));
1527+
}
1528+
}
15121529
});
15131530

15141531
function add_date_watchers() {

0 commit comments

Comments
 (0)