[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5a3e0dd391babe99beba48b8959ca14a1b777843

Evergreen Git git at git.evergreen-ils.org
Fri Jan 27 17:42:39 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, master has been updated
       via  5a3e0dd391babe99beba48b8959ca14a1b777843 (commit)
      from  a2e9d7a1148109ecba504422be996aebfef879b7 (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 5a3e0dd391babe99beba48b8959ca14a1b777843
Author: Kyle Huckins <khuckins at catalystdevworks.com>
Date:   Wed Oct 19 14:57:02 2016 -0700

    LP#1621947: webstaff address alert functionality
    
    Add Address Alert to the alerts pane when address alert
    is detected in the patron editor. This implements functionality
    that was originally added tot he XUL patron editor in LP#898248.
    
    To test:
    
    [1] Define an address alert.
    [2] Open a patron record in the webstaff patron editor and
        create or update an address that would match the alert
        set up in step 1. Verify, upon blur of street 1, street 2,
        or the city inputs that an alert is displayed.
    
    Note that the feature does not call for the presence of an
    address alert to prevent the operator from saving the record;
    the alert is purely advisory.
    
    Signed-off-by: Kyle Huckins <khuckins at catalystdevworks.com>
    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 5543e9d..b7516dc 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -55,6 +55,13 @@
     </div>
   </div>
 
+  <div class="alert alert-danger" ng-show="address_alerts.length > 0">
+      <div class="strong-text-3">[% l('Address Alert') %]</div>
+      <div ng-repeat="address_alert in address_alerts">
+        {{address_alert.alert_message()}}
+      </div>
+  </div>
+
   <!-- IDL field documentation window -->
   <div class="alert alert-info" ng-show="selected_field_doc">
     <fieldset id="reg-field-doc">
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 1005453..f0a45cd 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
@@ -1106,6 +1106,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
     // for existing patrons, disable barcode input by default
     $scope.disable_bc = $scope.focus_usrname = Boolean($scope.patron_id);
     $scope.focus_bc = !Boolean($scope.patron_id);
+    $scope.address_alerts = [];
     $scope.dupe_counts = {};
 
     // map of perm name to true/false for perms the logged in user
@@ -1587,6 +1588,27 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
         patronRegSvc.invalidate_field($scope.patron, field);
     }
 
+    address_alert = function(addr) {
+        var args = {
+            street1: addr.street1,
+            street2: addr.street2,
+            city: addr.city,
+            state: addr.state,
+            county: addr.county,
+            country: addr.country,
+            post_code: addr.post_code,
+            mailing_address: addr._is_mailing,
+            billing_address: addr._is_billing
+        }
+
+        egCore.net.request(
+            'open-ils.actor',
+            'open-ils.actor.address_alert.test',
+            egCore.auth.token(), egCore.auth.user().ws_ou(), args
+            ).then(function(res) {
+                $scope.address_alerts = res;
+        });
+    }
 
     $scope.dupe_value_changed = function(type, value) {
         $scope.dupe_counts[type] = 0;
@@ -1689,6 +1711,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
             case 'city':
                 // dupe search on address wants the address object as the value.
                 $scope.dupe_value_changed('address', obj);
+                address_alert(obj);
                 break;
 
             case 'post_code':

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/staff/circ/patron/t_edit.tt2     |    7 ++++++
 .../web/js/ui/default/staff/circ/patron/regctl.js  |   23 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list