Commit ecc5d71fb65c330c51618317743d7297932384e7
1 parent
b266ef32ab
Exists in
master
angular-ladda
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -75,7 +75,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
75 | 75 | } |
76 | 76 | ); |
77 | 77 | |
78 | - $scope.crearNotaPedido = function() { | |
78 | + $scope.crearNotaPedido = function() { | |
79 | 79 | if(!$scope.notaPedido.vendedor.CodVen) { |
80 | 80 | focaModalService.alert('Ingrese Vendedor'); |
81 | 81 | return; |
... | ... | @@ -106,6 +106,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
106 | 106 | focaModalService.alert('Debe cargar al menos un articulo'); |
107 | 107 | return; |
108 | 108 | } |
109 | + $scope.saveLoading = true; | |
109 | 110 | var notaPedido = { |
110 | 111 | id: $scope.notaPedido.id, |
111 | 112 | fechaCarga: $scope.now.toISOString().slice(0, 19).replace('T', ' '), |
... | ... | @@ -156,6 +157,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
156 | 157 | $scope.notaPedido.vendedor.CodVen); |
157 | 158 | |
158 | 159 | focaModalService.alert('Nota pedido creada'); |
160 | + $scope.saveLoading = false; | |
159 | 161 | $scope.cabecera = []; |
160 | 162 | addCabecera('Moneda:', $scope.notaPedido.moneda.DETALLE); |
161 | 163 | addCabecera( |
... | ... | @@ -186,6 +188,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
186 | 188 | }, |
187 | 189 | function(error) { |
188 | 190 | focaModalService.alert('Hubo un error al crear la nota de pedido'); |
191 | + $scope.saveLoading = false; | |
189 | 192 | console.info(error); |
190 | 193 | } |
191 | 194 | ); |