From b376e5ef16c34c8149e2682622ee1a2784d3f7bf Mon Sep 17 00:00:00 2001 From: Dan Briem Date: Thu, 16 Jul 2020 23:39:09 -0400 Subject: [PATCH] LP#1887876 Checkout catalog doesn't load workstation prefs The catalog under the Holds tab in the Checkout interface doesn't load the default search or preferred library if you haven't visited the main catalog page earlier in the session. This branch sets these settings as cookies in the AngularJS wrapper for the catalog embedded in the Checkout interface under the Holds tab. Test: 1. Close browser, open browser, log into Evergreen 2. Admin->Workstation set search & preferred library 3. Open a patron record -> Holds tab -> Place Holds 4. Search for an item owned by your preferred library 5. Note the library's copies aren't separately indicated 6. Apply patch and repeat steps 1-5 7. Note the library's copies are separately indicated Signed-off-by: Dan Briem Signed-off-by: Gina Monti Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/circ/patron/holds.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js b/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js index 798ff73d7d..058c02d44d 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js @@ -161,8 +161,16 @@ function($scope, $q, $routeParams, egCore, egUser, patronSvc, .controller('PatronHoldsCreateCtrl', - ['$scope','$routeParams','$location','egCore','egWorkLog','patronSvc', -function($scope , $routeParams , $location , egCore , egWorkLog , patronSvc) { + ['$scope','$routeParams','$location','egCore','egWorkLog','patronSvc','$cookies', +function($scope , $routeParams , $location , egCore , egWorkLog , patronSvc , $cookies) { + + // set preferred and search library cookies + egCore.hatch.getItem('eg.search.pref_lib').then(function(lib) { + $cookies.put('eg_pref_lib', lib, {path: '/'}); + }); + egCore.hatch.getItem('eg.search.search_lib').then(function(lib) { + $cookies.put('eg_search_lib', lib, {path: '/'}); + }); $scope.handlers = { opac_hold_placed : function(hold) { -- 2.11.0