Commit 1ea97c8632ff827d1a19a88bacf529cfd0f97987
1 parent
d31279610b
Exists in
master
and in
1 other branch
code review
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
src/js/controllerCisterna.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('focaAbmVehiculo') |
| 3 | 3 | '$scope', 'focaAbmVehiculoService', '$routeParams', '$location', '$uibModal', |
| 4 | 4 | 'focaModalService', 'focaBotoneraLateralService', '$timeout', |
| 5 | 5 | function($scope, focaAbmVehiculoService, $routeParams, $location, $uibModal, |
| 6 | - focaModalService, focaBotoneraLateralService, $timeout) { | |
| 6 | + focaModalService, focaBotoneraLateralService, $timeout) { | |
| 7 | 7 | $scope.nuevo = ($routeParams.idx > -1) ? false : true; |
| 8 | 8 | $scope.editar = false; |
| 9 | 9 | $scope.now = new Date(); |
| ... | ... | @@ -24,7 +24,7 @@ angular.module('focaAbmVehiculo') |
| 24 | 24 | focaBotoneraLateralService.showGuardar(true, $scope.guardar); |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | - if($routeParams.idx !== -1) { | |
| 27 | + if ($routeParams.idx !== -1) { | |
| 28 | 28 | $scope.cisterna = [$routeParams.idx]; |
| 29 | 29 | focaAbmVehiculoService |
| 30 | 30 | .getCisternas($routeParams.idVehiculo) |
| ... | ... | @@ -55,12 +55,12 @@ angular.module('focaAbmVehiculo') |
| 55 | 55 | }; |
| 56 | 56 | $scope.guardar = function() { |
| 57 | 57 | |
| 58 | - if($scope.formCisterna.$pristine) { | |
| 58 | + if ($scope.formCisterna.$pristine) { | |
| 59 | 59 | $scope.cancelar(); |
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - if(!$scope.cisterna.unidadMedida) { | |
| 63 | + if (!$scope.cisterna.unidadMedida) { | |
| 64 | 64 | focaModalService.alert('Ingrese unidad de medida'); |
| 65 | 65 | return; |
| 66 | 66 | } |
| ... | ... | @@ -71,7 +71,7 @@ angular.module('focaAbmVehiculo') |
| 71 | 71 | |
| 72 | 72 | focaAbmVehiculoService |
| 73 | 73 | .guardarCisterna($scope.cisterna, $routeParams.idx); |
| 74 | - | |
| 74 | + | |
| 75 | 75 | $timeout(function() { |
| 76 | 76 | $location.path('/vehiculo/' + $routeParams.idVehiculo + |
| 77 | 77 | '/' + $scope.transportista); |
| ... | ... | @@ -106,12 +106,12 @@ angular.module('focaAbmVehiculo') |
| 106 | 106 | var totalCargado = 0; |
| 107 | 107 | cisternas.forEach(function(cisterna, idx) { |
| 108 | 108 | //SI EL CODIGO YA EXISTE |
| 109 | - if(cisterna.codigo === $scope.cisterna.codigo && | |
| 109 | + if (cisterna.codigo === $scope.cisterna.codigo && | |
| 110 | 110 | idx !== $routeParams.idx && |
| 111 | 111 | !cisterna.desactivado) { |
| 112 | 112 | reject('Código de cisterna existente'); |
| 113 | 113 | } |
| 114 | - if(idx !== $routeParams.idx && | |
| 114 | + if (idx !== $routeParams.idx && | |
| 115 | 115 | !cisterna.desactivado) { |
| 116 | 116 | totalCargado += cisterna.capacidad; |
| 117 | 117 | } |