Commit 29382a3d55bd11bda014d1bb9cdc093778e55668
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !34
Showing
5 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -131,7 +131,7 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 131 | 131 | getSeguimiento(); |
| 132 | 132 | }; |
| 133 | 133 | |
| 134 | - $scope.seleccionarUnidad = function() { | |
| 134 | + $scope.seleccionarVehículo = function() { | |
| 135 | 135 | var modalInstance = $uibModal.open( |
| 136 | 136 | { |
| 137 | 137 | ariaLabelledBy: 'Busqueda de Transportista', |
| ... | ... | @@ -146,11 +146,11 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 146 | 146 | } |
| 147 | 147 | ); |
| 148 | 148 | modalInstance.result.then(function(transportista) { |
| 149 | - $scope.seleccionarVehiculo(transportista.COD); | |
| 149 | + $scope.selectVehiculo(transportista.COD); | |
| 150 | 150 | }); |
| 151 | 151 | }; |
| 152 | 152 | |
| 153 | - $scope.seleccionarVehiculo = function(idTransportista) { | |
| 153 | + $scope.selectVehiculo = function(idTransportista) { | |
| 154 | 154 | var query = '/vehiculo/transportista/' + idTransportista; |
| 155 | 155 | var columnas = { |
| 156 | 156 | nombre: ['Código', 'tractor', 'Semi', 'Capacidad'], |
| ... | ... | @@ -224,8 +224,8 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | function eliminarVehiculo(vehiculo) { |
| 227 | - focaLogisticaPedidoRutaService.getRemitos(vehiculo.id).then(function(res) { | |
| 228 | - if(!focaLogisticaPedidoRutaService.obtenerRemitosDeCarga(res.data).length) { | |
| 227 | + focaLogisticaPedidoRutaService.getRemitosByIdVehiculo(vehiculo.id).then(function(res) { | |
| 228 | + if(!res.data.length) { | |
| 229 | 229 | $scope.vehiculos.splice($scope.vehiculos.indexOf(vehiculo), 1); |
| 230 | 230 | }else { |
| 231 | 231 | focaModalService.alert('No ha sido posible eliminar el vehiculo porque ' + |
src/js/osm-directive.js
| ... | ... | @@ -43,10 +43,6 @@ angular.module('focaLogisticaPedidoRuta').directive('focaLogistica', function() |
| 43 | 43 | observacion += '<br/>Distancia a casa central: ' + |
| 44 | 44 | marcador.distancia + 'km'; |
| 45 | 45 | } |
| 46 | - observacion += '<br/>'; | |
| 47 | - observacion += '<i class="fa fa-map-marker fa-3x" aria-hidden="true"'+ | |
| 48 | - 'class="form-control" ondragend="dropEnd()" ondragstart=\'drag(event, '+ | |
| 49 | - JSON.stringify(marcador)+')\' draggable="true"></i>(Arrastrar icono)'; | |
| 50 | 46 | var icon; |
| 51 | 47 | if(marcador.notaPedido.remito.idUsuarioProceso) { |
| 52 | 48 | //Asignado ROJO |
| ... | ... | @@ -59,6 +55,10 @@ angular.module('focaLogisticaPedidoRuta').directive('focaLogistica', function() |
| 59 | 55 | shadowSize: [41, 41] |
| 60 | 56 | }); |
| 61 | 57 | }else { |
| 58 | + observacion += '<br/>'; | |
| 59 | + observacion += '<i class="fa fa-map-marker fa-3x" aria-hidden="true"'+ | |
| 60 | + 'class="form-control" ondragend="dropEnd()" ondragstart=\'drag(event, '+ | |
| 61 | + JSON.stringify(marcador)+')\' draggable="true"></i>(Arrastrar icono)'; | |
| 62 | 62 | //Sin asignar VERDE |
| 63 | 63 | icon = new L.Icon({ |
| 64 | 64 | iconUrl: 'img/marker-icon-2x-green.png', |
src/js/service.js
| ... | ... | @@ -34,9 +34,10 @@ angular.module('focaLogisticaPedidoRuta') |
| 34 | 34 | }); |
| 35 | 35 | }, |
| 36 | 36 | getRemitosByIdVehiculo: function(idVehiculo, sinConfirmar, sinHojaRuta) { |
| 37 | + var sinHoja = sinHojaRuta ? '/sinHojaRuta' : ''; | |
| 37 | 38 | return $http.get(url + '/vehiculo/obtener/remitos/' + |
| 38 | 39 | idVehiculo + '/' + this.fecha.toISOString().substring(0, 10) + |
| 39 | - '/' + sinConfirmar + '/' + sinHojaRuta); | |
| 40 | + '/' + sinConfirmar + sinHoja); | |
| 40 | 41 | }, |
| 41 | 42 | getVehiculosByIdUsuario: function() { |
| 42 | 43 | return $http.get(url + '/vehiculo/usuario/' + this.idUsuario); |
src/views/foca-logistica-pedido-ruta.html
| ... | ... | @@ -105,10 +105,16 @@ |
| 105 | 105 | <span class="progress-right"> |
| 106 | 106 | <span class="progress-bar"></span> |
| 107 | 107 | </span> |
| 108 | - <div class="progress-value">{{vehiculo.codigo}} | |
| 109 | - <br> | |
| 110 | - <small> | |
| 111 | - {{vehiculo.transportista.NOM.trim()}} | |
| 108 | + <div class="progress-value py-4 px-3 d-flex align-content-between flex-wrap"> | |
| 109 | + <small class="w-100"> | |
| 110 | + <small> | |
| 111 | + <small> | |
| 112 | + {{vehiculo.transportista.NOM.trim()}} | |
| 113 | + </small> | |
| 114 | + </small> | |
| 115 | + </small> | |
| 116 | + <small class="w-100"> | |
| 117 | + {{vehiculo.codigo}} | |
| 112 | 118 | </small> |
| 113 | 119 | </div> |
| 114 | 120 | </div> |
src/views/foca-modal-cerrar-vehiculo.html
| ... | ... | @@ -46,7 +46,12 @@ |
| 46 | 46 | <th>Remito Nº</th> |
| 47 | 47 | <th>Cliente</th> |
| 48 | 48 | <th>Domicilio de entrega</th> |
| 49 | - <th>Eliminar</th> | |
| 49 | + <th>Eliminar | |
| 50 | + <i | |
| 51 | + class="fa fa-info" | |
| 52 | + uib-tooltip="Los remitos que no se pueden eliminar tienen asignada una hoja de ruta"> | |
| 53 | + </i> | |
| 54 | + </th> | |
| 50 | 55 | </tr> |
| 51 | 56 | </thead> |
| 52 | 57 | <tbody> |