Commit a34968ff389a1a5904a815bac2e29ae3f8bf1429
1 parent
72406e4b5f
Exists in
master
validaciones
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -26,6 +26,19 @@ angular.module('focaModalRemito') |
| 26 | 26 | //METODOS |
| 27 | 27 | $scope.busquedaPress = function(key) { |
| 28 | 28 | if (key === 13) { |
| 29 | + //TODO Validaciones con alertas de foca | |
| 30 | + if(!$scope.fechaDesde) { | |
| 31 | + alert('INGRESE FECHA DESDE'); | |
| 32 | + return; | |
| 33 | + } | |
| 34 | + if(!$scope.fechaHasta) { | |
| 35 | + alert('INGRESE FECHA HASTA'); | |
| 36 | + return; | |
| 37 | + } | |
| 38 | + if($scope.fechaDesde > $scope.fechaHasta) { | |
| 39 | + alert('La fecha desde no puede ser mayor a la fecha hasta'); | |
| 40 | + return; | |
| 41 | + } | |
| 29 | 42 | $scope.searchLoading = true; |
| 30 | 43 | //TODO: usar filtros en vez de toISOString |
| 31 | 44 | focaModalRemitoService |