Sha256: 36dd78e8e117d6e9a15c2103d39999ba5194c09b5fd8cd6f49ece3cd62cac7d7
Contents?: true
Size: 1.75 KB
Versions: 9
Compression:
Stored size: 1.75 KB
Contents
/** * @ngdoc object * @name Bastion.products.controller:ProductsBulkActionSyncPlanController * * @requires $scope * @requires Nutupane * @requires SyncPlan * @requires ProductBulkAction * * @description * A controller for providing bulk sync plan functionality for products. */ angular.module('Bastion.products').controller('ProductsBulkActionSyncPlanController', ['$scope', 'Nutupane', 'SyncPlan', 'ProductBulkAction', function ($scope, Nutupane, SyncPlan, ProductBulkAction) { var syncPlanNutupane = new Nutupane(SyncPlan); $scope.successMessages = []; $scope.errorMessages = []; $scope.syncPlanTable = syncPlanNutupane.table; syncPlanNutupane.query(); function success(response) { $scope.$parent.successMessages = response.displayMessages.success; $scope.$parent.errorMessages = response.displayMessages.error; $scope.updatingSyncPlans = false; } function error(response) { $scope.$parent.errorMessages = response.data.errors; $scope.updatingSyncPlans = false; } $scope.updateSyncPlan = function () { $scope.updatingSyncPlans = true; $scope.actionParams.ids = $scope.getSelectedProductIds(); $scope.actionParams['plan_id'] = $scope.syncPlanTable.chosenRow.id; ProductBulkAction.updateProductSyncPlan($scope.actionParams, success, error); }; $scope.removeSyncPlan = function () { $scope.updatingSyncPlans = true; $scope.actionParams.ids = $scope.getSelectedProductIds(); $scope.actionParams['plan_id'] = null; ProductBulkAction.updateProductSyncPlan($scope.actionParams, success, error); }; }] );
Version data entries
9 entries across 9 versions & 1 rubygems