Commit a1ee0c390ba6b43d08060f1f5b1e6ccee5bbfb8c

Authored by Jose Pinto
1 parent 768638b527
Exists in master

ok boton guardar cargando

Showing 1 changed file with 3 additions and 4 deletions   Show diff stats
src/js/controller.js
... ... @@ -104,7 +104,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl',
104 104 focaModalService.alert('Debe cargar al menos un articulo');
105 105 return;
106 106 }
107   - $scope.saveLoading = true;
  107 + focaBotoneraLateralService.startGuardar();
108 108 var notaPedido = {
109 109 id: $scope.notaPedido.id,
110 110 fechaCarga: $scope.now.toISOString().slice(0, 19).replace('T', ' '),
... ... @@ -158,8 +158,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl',
158 158 notaPedidoBusinessService.addEstado(data.data.id,
159 159 $scope.notaPedido.vendedor.CodVen);
160 160  
161   - focaModalService.alert('Nota pedido creada');
162   - $scope.saveLoading = false;
  161 + focaBotoneraLateralService.endGuardar(true);
163 162 $scope.$broadcast('cleanCabecera');
164 163 $scope.$broadcast('addCabecera', {
165 164 label: 'Moneda:',
... ... @@ -200,7 +199,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl',
200 199 },
201 200 function(error) {
202 201 focaModalService.alert('Hubo un error al crear la nota de pedido');
203   - $scope.saveLoading = false;
  202 + focaBotoneraLateralService.endGuardar();
204 203 console.info(error);
205 204 }
206 205 );