From 6958012061096d36b815fed108b28023ae6174c2 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 24 May 2019 10:20:15 -0400 Subject: [PATCH] LP1825896 AngJS workstation retrieval repairs Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/admin/workstation/app.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index a5ee231a26..9dfbc9c873 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -234,8 +234,13 @@ function($scope , egCore) { $scope.setContentType = function(type) { $scope.contentType = type } $scope.setContentType('text/plain'); + var hatchPrinting = false; + egCore.hatch.usePrinting().then(function(answer) { + hatchPrinting = answer; + }); + $scope.useHatchPrinting = function() { - return egCore.hatch.usePrinting(); + return hatchPrinting; } $scope.hatchIsOpen = function() { @@ -980,15 +985,18 @@ function($scope , egCore , ngToast) { var hatch = egCore.hatch; // convenience $scope.hatch_available = hatch.hatchAvailable; - $scope.hatch_printing = hatch.usePrinting(); $scope.hatch_settings = hatch.useSettings(); $scope.hatch_offline = hatch.useOffline(); + hatch.usePrinting().then(function(answer) { + $scope.hatch_printing = answer; + }); + // Apply Hatch settings as changes occur in the UI. $scope.$watch('hatch_printing', function(newval) { if (typeof newval != 'boolean') return; - hatch.setLocalItem('eg.hatch.enable.printing', newval); + hatch.setItem('eg.hatch.enable.printing', newval); }); $scope.$watch('hatch_settings', function(newval) { -- 2.11.0