From fc886e1d96a6bf5f78da305d94a0b4271ca2dbe4 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 31 Aug 2017 21:14:32 -0400 Subject: [PATCH] LP#1709521 Apply recent patrons from checkout Load the max recent patrons setting directly in the patron service instead of requring the calling UI to apply it. This fixes an issue where recent patrons are not set from the checkout-by-barcode interface. Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier --- .../ui/default/staff/services/patron_search.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/services/patron_search.js b/Open-ILS/web/js/ui/default/staff/services/patron_search.js index 21e477d495..c27274ffda 100644 --- a/Open-ILS/web/js/ui/default/staff/services/patron_search.js +++ b/Open-ILS/web/js/ui/default/staff/services/patron_search.js @@ -48,6 +48,18 @@ function($q , $timeout , $location , egCore, egUser , egConfirmDialog , $locale } service.resetPatronLists(); // initialize + // Max recents setting is loaded and scrubbed during egStartup. + // Copy it to a local variable here for ease of local access + // after startup has run. + egCore.startup.go().then( + function() { + egCore.org.settings('ui.staff.max_recent_patrons') + .then(function(s) { + service.maxRecentPatrons = s['ui.staff.max_recent_patrons']; + }); + } + ); + // Returns true if the last alerted patron matches the current // patron. Otherwise, the last alerted patron is set to the // current patron and false is returned. @@ -509,12 +521,6 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, selectedItems : function() {return []} } - // Max recents setting is loaded and scrubbed during egStartup. - // Copy it to a local variable here for ease of local access. - egCore.org.settings('ui.staff.max_recent_patrons').then(function(s) { - patronSvc.maxRecentPatrons = s['ui.staff.max_recent_patrons']; - }); - // The first time we encounter the show-recent CGI param, put the // service into show-recent mode. The first time recents are shown, // the service is taken out of show-recent mode so the page does not -- 2.43.2