From: Bill Erickson Date: Fri, 1 Sep 2017 01:14:32 +0000 (-0400) Subject: LP#1709521 Apply recent patrons from checkout X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fc886e1d96a6bf5f78da305d94a0b4271ca2dbe4;p=evergreen%2Fmasslnc.git 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 --- 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