From c8aa436f17f83c00491c24f8638b7466ef172715 Mon Sep 17 00:00:00 2001 From: efernandez Date: Tue, 5 Feb 2019 15:24:20 -0300 Subject: [PATCH] pre commit correcto --- gulpfile.js | 4 +--- src/js/controller.js | 4 ++-- src/js/controllerCisterna.js | 6 +++--- src/js/service.js | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c1c9d21..e6d7dab 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -56,7 +56,7 @@ gulp.task('clean', function() { }); gulp.task('pre-commit', function() { - pump( + return pump( [ gulp.src(paths.srcJS), jshint('.jshintrc'), @@ -64,8 +64,6 @@ gulp.task('pre-commit', function() { jshint.reporter('fail') ] ); - - gulp.start('uglify'); }); gulp.task('clean-post-install', function() { diff --git a/src/js/controller.js b/src/js/controller.js index 30008be..36da64e 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -36,7 +36,7 @@ angular.module('focaAbmVehiculo') } } ); - } + }; $scope.seleccionarTransportista = function() { var parametrosModal = { titulo: 'Búsqueda de Transportista', @@ -234,7 +234,7 @@ angular.module('focaAbmVehiculo') total += parseInt(cisterna.capacidad); } }); - return $scope.vehiculo.capacidad == total; + return $scope.vehiculo.capacidad === total; } function guardarCisternas() { diff --git a/src/js/controllerCisterna.js b/src/js/controllerCisterna.js index 8927dde..6b17b90 100644 --- a/src/js/controllerCisterna.js +++ b/src/js/controllerCisterna.js @@ -25,7 +25,7 @@ angular.module('focaAbmVehiculo') }); if($routeParams.idx !== -1) { - $scope.cisterna = [$routeParams.idx] + $scope.cisterna = [$routeParams.idx]; focaAbmVehiculoService .getCisternas($routeParams.idVehiculo) .then(function(res) { @@ -99,11 +99,11 @@ angular.module('focaAbmVehiculo') cisternas.forEach(function(cisterna, idx) { //SI EL CODIGO YA EXISTE if(cisterna.codigo === $scope.cisterna.codigo && - idx != $routeParams.idx && + idx !== $routeParams.idx && !cisterna.desactivado) { reject('Código de cisterna existente'); } - if(idx != $routeParams.idx && + if(idx !== $routeParams.idx && !cisterna.desactivado) { totalCargado += cisterna.capacidad; } diff --git a/src/js/service.js b/src/js/service.js index 34f68c9..eed9716 100644 --- a/src/js/service.js +++ b/src/js/service.js @@ -21,7 +21,7 @@ angular.module('focaAbmVehiculo') if(cisternas.length) { return Promise.resolve(angular.copy(cisternas)); }else { - return new Promise(function(resolve, reject) { + return new Promise(function(resolve) { $http.get(API_ENDPOINT.URL + '/cisterna/listar/' + idVehiculo) .then(function(res) { cisternas = res.data; @@ -31,7 +31,7 @@ angular.module('focaAbmVehiculo') } }, guardarCisterna: function(cisterna, idx) { - if(idx != -1) { + if(idx !== -1) { //update cisternas[idx] = cisterna; }else { -- 1.9.1