Commit c8aa436f17f83c00491c24f8638b7466ef172715
1 parent
d6d4ef19c2
Exists in
master
pre commit correcto
Showing
4 changed files
with
8 additions
and
10 deletions
Show diff stats
gulpfile.js
| ... | ... | @@ -56,7 +56,7 @@ gulp.task('clean', function() { |
| 56 | 56 | }); |
| 57 | 57 | |
| 58 | 58 | gulp.task('pre-commit', function() { |
| 59 | - pump( | |
| 59 | + return pump( | |
| 60 | 60 | [ |
| 61 | 61 | gulp.src(paths.srcJS), |
| 62 | 62 | jshint('.jshintrc'), |
| ... | ... | @@ -64,8 +64,6 @@ gulp.task('pre-commit', function() { |
| 64 | 64 | jshint.reporter('fail') |
| 65 | 65 | ] |
| 66 | 66 | ); |
| 67 | - | |
| 68 | - gulp.start('uglify'); | |
| 69 | 67 | }); |
| 70 | 68 | |
| 71 | 69 | gulp.task('clean-post-install', function() { |
src/js/controller.js
| ... | ... | @@ -36,7 +36,7 @@ angular.module('focaAbmVehiculo') |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | ); |
| 39 | - } | |
| 39 | + }; | |
| 40 | 40 | $scope.seleccionarTransportista = function() { |
| 41 | 41 | var parametrosModal = { |
| 42 | 42 | titulo: 'Búsqueda de Transportista', |
| ... | ... | @@ -234,7 +234,7 @@ angular.module('focaAbmVehiculo') |
| 234 | 234 | total += parseInt(cisterna.capacidad); |
| 235 | 235 | } |
| 236 | 236 | }); |
| 237 | - return $scope.vehiculo.capacidad == total; | |
| 237 | + return $scope.vehiculo.capacidad === total; | |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | function guardarCisternas() { |
src/js/controllerCisterna.js
| ... | ... | @@ -25,7 +25,7 @@ angular.module('focaAbmVehiculo') |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | 27 | if($routeParams.idx !== -1) { |
| 28 | - $scope.cisterna = [$routeParams.idx] | |
| 28 | + $scope.cisterna = [$routeParams.idx]; | |
| 29 | 29 | focaAbmVehiculoService |
| 30 | 30 | .getCisternas($routeParams.idVehiculo) |
| 31 | 31 | .then(function(res) { |
| ... | ... | @@ -99,11 +99,11 @@ angular.module('focaAbmVehiculo') |
| 99 | 99 | cisternas.forEach(function(cisterna, idx) { |
| 100 | 100 | //SI EL CODIGO YA EXISTE |
| 101 | 101 | if(cisterna.codigo === $scope.cisterna.codigo && |
| 102 | - idx != $routeParams.idx && | |
| 102 | + idx !== $routeParams.idx && | |
| 103 | 103 | !cisterna.desactivado) { |
| 104 | 104 | reject('Código de cisterna existente'); |
| 105 | 105 | } |
| 106 | - if(idx != $routeParams.idx && | |
| 106 | + if(idx !== $routeParams.idx && | |
| 107 | 107 | !cisterna.desactivado) { |
| 108 | 108 | totalCargado += cisterna.capacidad; |
| 109 | 109 | } |
src/js/service.js
| ... | ... | @@ -21,7 +21,7 @@ angular.module('focaAbmVehiculo') |
| 21 | 21 | if(cisternas.length) { |
| 22 | 22 | return Promise.resolve(angular.copy(cisternas)); |
| 23 | 23 | }else { |
| 24 | - return new Promise(function(resolve, reject) { | |
| 24 | + return new Promise(function(resolve) { | |
| 25 | 25 | $http.get(API_ENDPOINT.URL + '/cisterna/listar/' + idVehiculo) |
| 26 | 26 | .then(function(res) { |
| 27 | 27 | cisternas = res.data; |
| ... | ... | @@ -31,7 +31,7 @@ angular.module('focaAbmVehiculo') |
| 31 | 31 | } |
| 32 | 32 | }, |
| 33 | 33 | guardarCisterna: function(cisterna, idx) { |
| 34 | - if(idx != -1) { | |
| 34 | + if(idx !== -1) { | |
| 35 | 35 | //update |
| 36 | 36 | cisternas[idx] = cisterna; |
| 37 | 37 | }else { |