Commit ab459df5d74743d897bd291f07aeb3b220e4f2af
1 parent
e5d647d913
Exists in
master
and in
1 other branch
Codigo indentado.
Showing
1 changed file
with
21 additions
and
21 deletions
Show diff stats
src/js/controller.js
1 | 1 | angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoController', [ |
2 | 2 | '$scope', '$timeout', 'focaAdminSeguimientoService', '$uibModal', |
3 | - 'focaBotoneraLateralService','$location', '$routeParams', | |
4 | - function($scope, $timeout, focaAdminSeguimientoService, $uibModal, | |
3 | + 'focaBotoneraLateralService', '$location', '$routeParams', | |
4 | + function ($scope, $timeout, focaAdminSeguimientoService, $uibModal, | |
5 | 5 | focaBotoneraLateralService, $location, $routeParams) { |
6 | 6 | $scope.actividad = ''; |
7 | 7 | $scope.titulo = ''; |
... | ... | @@ -43,27 +43,27 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
43 | 43 | focaBotoneraLateralService.showPausar(false); |
44 | 44 | focaBotoneraLateralService.showGuardar(false); |
45 | 45 | |
46 | - $scope.general = function() { | |
46 | + $scope.general = function () { | |
47 | 47 | $scope.idUsuario = 0; |
48 | 48 | getSeguimiento(); |
49 | 49 | }; |
50 | 50 | |
51 | - $scope.individual = function() { | |
51 | + $scope.individual = function () { | |
52 | 52 | $scope.idUsuario = -1; |
53 | 53 | }; |
54 | 54 | |
55 | - $scope.salir = function() { | |
55 | + $scope.salir = function () { | |
56 | 56 | $location.path('/'); |
57 | 57 | }; |
58 | 58 | |
59 | - $scope.search = function(key) { | |
59 | + $scope.search = function (key) { | |
60 | 60 | if (key === 13) { |
61 | 61 | $scope.idUsuario = $scope.idUsuarioInput; |
62 | - | |
62 | + | |
63 | 63 | getSeguimiento(); |
64 | 64 | if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { |
65 | 65 | focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) |
66 | - .then(function(res) { | |
66 | + .then(function (res) { | |
67 | 67 | var remitos = []; |
68 | 68 | for (var i = 0; i < res.data.length; i++) { |
69 | 69 | remitos = remitos.concat(res.data[i].remitos); |
... | ... | @@ -74,11 +74,11 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
74 | 74 | } |
75 | 75 | }; |
76 | 76 | |
77 | - $scope.fecha = function() { | |
77 | + $scope.fecha = function () { | |
78 | 78 | getSeguimiento(); |
79 | 79 | }; |
80 | 80 | |
81 | - $scope.showMarcadores = function() { | |
81 | + $scope.showMarcadores = function () { | |
82 | 82 | var texto = ''; |
83 | 83 | |
84 | 84 | if ($scope.actividad === 'Nota de pedido') { |
... | ... | @@ -101,7 +101,7 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
101 | 101 | controller: 'focaModalMarcadoresController', |
102 | 102 | size: 'lg', |
103 | 103 | resolve: { |
104 | - parametros: function() { | |
104 | + parametros: function () { | |
105 | 105 | var parametros = { |
106 | 106 | marcadores: $scope.marcadores, |
107 | 107 | actividad: $scope.actividad |
... | ... | @@ -114,13 +114,13 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
114 | 114 | ); |
115 | 115 | |
116 | 116 | modalInstance.result.then( |
117 | - function(localizacion) { | |
117 | + function (localizacion) { | |
118 | 118 | $scope.$broadcast('moveMap', { |
119 | 119 | latitud: localizacion.latitud, |
120 | 120 | longitud: localizacion.longitud, |
121 | 121 | indice: localizacion.indice |
122 | 122 | }); |
123 | - }, function() { | |
123 | + }, function () { | |
124 | 124 | // funcion ejecutada cuando se cancela el modal |
125 | 125 | } |
126 | 126 | ); |
... | ... | @@ -130,7 +130,7 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
130 | 130 | var now = $scope.now; |
131 | 131 | var hasta = angular.copy(now); |
132 | 132 | hasta.setDate(hasta.getDate() + 1); |
133 | - | |
133 | + | |
134 | 134 | var datos = { |
135 | 135 | actividad: $scope.actividad, |
136 | 136 | idUsuario: $scope.idUsuario, |
... | ... | @@ -147,10 +147,10 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
147 | 147 | |
148 | 148 | focaAdminSeguimientoService |
149 | 149 | .obtenerActividad(datos) |
150 | - .then(function(datos) { | |
150 | + .then(function (datos) { | |
151 | 151 | $scope.marcadores = datos.data; |
152 | 152 | $scope.$broadcast('cleanCabecera'); |
153 | - | |
153 | + | |
154 | 154 | if ($scope.idUsuario !== 0) { |
155 | 155 | $scope.$broadcast('addCabecera', { |
156 | 156 | label: 'Individual', |
... | ... | @@ -171,11 +171,11 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
171 | 171 | if (datos.data.length) { |
172 | 172 | valor = datos.data[0].hojaRutaMovimiento.remito.hojaRuta |
173 | 173 | .vehiculo.codigo + ' - ' + datos.data[0] |
174 | - .hojaRutaMovimiento.remito.hojaRuta.vehiculo.tractor.trim(); | |
174 | + .hojaRutaMovimiento.remito.hojaRuta.vehiculo.tractor.trim(); | |
175 | 175 | } else { |
176 | 176 | valor = $scope.idUsuario; |
177 | 177 | } |
178 | - | |
178 | + | |
179 | 179 | break; |
180 | 180 | case 'cobranza': |
181 | 181 | if (datos.data.length) { |
... | ... | @@ -186,19 +186,19 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
186 | 186 | } |
187 | 187 | break; |
188 | 188 | } |
189 | - | |
189 | + | |
190 | 190 | $scope.$broadcast('addCabecera', { |
191 | 191 | label: cabecera, |
192 | 192 | valor: valor |
193 | 193 | }); |
194 | 194 | |
195 | 195 | } else { |
196 | - $scope.$broadcast('addCabecera',{ | |
196 | + $scope.$broadcast('addCabecera', { | |
197 | 197 | label: 'General', |
198 | 198 | valor: '' |
199 | 199 | }); |
200 | 200 | } |
201 | - | |
201 | + | |
202 | 202 | $scope.$broadcast('addCabecera', { |
203 | 203 | label: 'Cantidad: ', |
204 | 204 | valor: datos.data.length + ' Marcadores' |