Commit 102db7330859df7c552a4c6bcafd16c007a19e40
1 parent
8fe02f5aa8
Exists in
master
and in
1 other branch
code revir
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -73,8 +73,7 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 73 | 73 | }; |
| 74 | 74 | |
| 75 | 75 | $scope.quitarVehiculo = function(vehiculo) { |
| 76 | - if(!eligioFecha()) return; | |
| 77 | - if(vehiculoEnUso(vehiculo)) return; | |
| 76 | + if(!eligioFecha() || vehiculoEnUso(vehiculo)) return; | |
| 78 | 77 | focaModalService.confirm('Esta seguro que desea eliminar el vehículo ' + |
| 79 | 78 | vehiculo.codigo + '?').then(function() { |
| 80 | 79 | eliminarVehiculo(vehiculo); |
| ... | ... | @@ -82,9 +81,7 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 82 | 81 | }; |
| 83 | 82 | |
| 84 | 83 | $scope.hacerHojaRuta = function(vehiculo) { |
| 85 | - if(!eligioFecha()) return; | |
| 86 | - if(vehiculoEnUso(vehiculo)) return; | |
| 87 | - | |
| 84 | + if(!eligioFecha() || vehiculoEnUso(vehiculo)) return; | |
| 88 | 85 | var modalInstance = $uibModal.open( |
| 89 | 86 | { |
| 90 | 87 | ariaLabelledBy: 'Creación hoja ruta', |