PI reset and save step improvements

This commit is contained in:
Matt-Yorkley
2017-03-06 19:21:06 +00:00
committed by Rob Harrington
parent 648753b412
commit 91fc3f33a0
5 changed files with 49 additions and 16 deletions

View File

@@ -1,7 +1,13 @@
angular.module("ofn.admin").controller "ImportOptionsFormCtrl", ($scope, $timeout, $rootScope, ProductImportService) ->
$scope.toggleResetAbsent = () ->
ProductImportService.updateResetAbsent($scope.supplierId, $scope.nonUpdated, $scope.resetAbsent)
confirmed = confirm 'This will set stock level to zero on all products for this \n' +
'enterprise that are not present in the uploaded file.' if $scope.resetAbsent
if confirmed or !$scope.resetAbsent
ProductImportService.updateResetAbsent($scope.supplierId, $scope.nonUpdated, $scope.resetAbsent)
else
$scope.resetAbsent = false
$scope.resetCount = ProductImportService.resetCount