LP#1576435: Include inactive patrons on patron reg duplicate search in web client
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 27 May 2016 20:10:29 +0000 (13:10 -0700)
committerKathy Lussier <klussier@masslnc.org>
Mon, 6 Mar 2017 02:35:37 +0000 (21:35 -0500)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/app.js

index b7516dc..69da8b6 100644 (file)
@@ -25,7 +25,7 @@
     [%# 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}}">
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}&inactive=1">
       [% l('[_1] patron(s) with same name', '{{dupe_counts.name}}') %]
       </a>
     </div>
index e075c4f..28038a0 100644 (file)
@@ -851,9 +851,15 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
             patronSvc.urlSearch.sort = [];
         }
         delete patronSvc.urlSearch.search.search_sort;
+
+        // include inactive patrons if "inactive" param
+        if ($location.search().inactive) {
+            patronSvc.urlSearch.inactive = $location.search().inactive;
+        }
     }
 
     var propagate;
+    var propagate_inactive;
     if (patronSvc.lastSearch) {
         propagate = patronSvc.lastSearch.search;
         // home_ou needs to be treated specially
@@ -863,6 +869,9 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
         };
     } else if (patronSvc.urlSearch) {
         propagate = patronSvc.urlSearch.search;
+        if (patronSvc.urlSearch.inactive) {
+            propagate_inactive = patronSvc.urlSearch.inactive;
+        }
     }
 
     if (egCore.env.pgt) {
@@ -887,6 +896,9 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
                 val.value = egCore.org.get(val.value);
             $scope.searchArgs[key] = val.value;
         });
+        if (propagate_inactive) {
+            $scope.searchArgs[inactive] = propagate_inactive;
+        }
     }
 
     var provider = egGridDataProvider.instance({});