Commit 17144b6f0af6043d5f7f967e7100f7c4d50c67be
1 parent
ac32559d1a
Exists in
master
espacio, reemplazo alert por modal.alert
Showing
2 changed files
with
11 additions
and
5 deletions
Show diff stats
src/js/app.js
src/js/controller.js
... | ... | @@ -6,8 +6,9 @@ angular.module('focaModalPuntoDescarga') |
6 | 6 | '$uibModalInstance', |
7 | 7 | 'focaModalPuntoDescargaService', |
8 | 8 | 'filters', |
9 | + 'focaModalService', | |
9 | 10 | function($timeout, $filter, $scope, $uibModalInstance, |
10 | - focaModalPuntoDescargaService, filters) { | |
11 | + focaModalPuntoDescargaService, filters, focaModalService) { | |
11 | 12 | |
12 | 13 | $scope.cantidadArticulo = 0; |
13 | 14 | $scope.articuloSeleccionado = 0; |
... | ... | @@ -77,9 +78,9 @@ angular.module('focaModalPuntoDescarga') |
77 | 78 | cantidadRestante = articulo.restante - punto.cantidadACargar; |
78 | 79 | |
79 | 80 | if(cantidadRestante < 0) { |
80 | - alert('La cantidad a cargar debe ser menor o igual al restante'); | |
81 | + focaModalService.alert('La cantidad a cargar debe ser menor o igual al restante'); | |
81 | 82 | }else if(punto.cantidadACargar <= 0) { |
82 | - alert('La cantidad a cargar debe ser mayor que cero'); | |
83 | + focaModalService.alert('La cantidad a cargar debe ser mayor que cero'); | |
83 | 84 | }else { |
84 | 85 | punto.cargado += parseInt(punto.cantidadACargar); |
85 | 86 | articulo.restante = cantidadRestante; |
... | ... | @@ -160,7 +161,7 @@ angular.module('focaModalPuntoDescarga') |
160 | 161 | }); |
161 | 162 | } |
162 | 163 | } |
163 | - function agregarTotalCargado(puntosDescarga){ | |
164 | + function agregarTotalCargado(puntosDescarga) { | |
164 | 165 | puntosDescarga.map(function(punto) { |
165 | 166 | punto.cantidadACargar = 0; |
166 | 167 | punto.cargado = 0; |