From: Jason Stephenson Date: Sun, 9 Jan 2022 01:08:11 +0000 (-0500) Subject: Attempt to add toast to individual view X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1edb28db43bc850acbadddaf1603b7dec31dc8a1;p=working%2FEvergreen.git Attempt to add toast to individual view --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 0a9371ad1d..7346e2a922 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -52,8 +52,8 @@ angular.module('egItemStatus', * Parent scope for list and detail views */ .controller('SearchCtrl', - ['$scope','$q','$window','$location','$timeout','egCore','egNet','egGridDataProvider','egItem', 'egCirc', -function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridDataProvider , itemSvc , egCirc) { + ['$scope','$q','$window','$location','$timeout','egCore','egNet','egGridDataProvider','egItem', 'egCirc', 'ngToast', +function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridDataProvider , itemSvc , egCirc, ngToast) { $scope.args = {}; // search args // sub-scopes (search / detail-view) apply their version @@ -156,6 +156,11 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD $scope.update_inventory = function() { itemSvc.updateInventory([$scope.args.copyId], null) .then(function(res) { + if (res[0]) { + ngToast.create(egCore.strings.SUCCESS_UPDATE_INVENTORY); + } else { + ngToast.warning(egCore.strings.FAIL_UPDATE_INVENTORY); + } $timeout(function() { location.href = location.href; }, 1000); }); }