From 102db7330859df7c552a4c6bcafd16c007a19e40 Mon Sep 17 00:00:00 2001 From: efernandez Date: Mon, 14 Jan 2019 16:49:08 -0300 Subject: [PATCH] code revir --- src/js/controller.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index 1fcc074..df17619 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -73,8 +73,7 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo }; $scope.quitarVehiculo = function(vehiculo) { - if(!eligioFecha()) return; - if(vehiculoEnUso(vehiculo)) return; + if(!eligioFecha() || vehiculoEnUso(vehiculo)) return; focaModalService.confirm('Esta seguro que desea eliminar el vehículo ' + vehiculo.codigo + '?').then(function() { eliminarVehiculo(vehiculo); @@ -82,9 +81,7 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo }; $scope.hacerHojaRuta = function(vehiculo) { - if(!eligioFecha()) return; - if(vehiculoEnUso(vehiculo)) return; - + if(!eligioFecha() || vehiculoEnUso(vehiculo)) return; var modalInstance = $uibModal.open( { ariaLabelledBy: 'Creación hoja ruta', -- 1.9.1