Commit 964bc8439cf7b5157624f1b90f1a836158deb50b
Exists in
master
and in
2 other branches
Merge branch 'master' into 'master'
refactor services See merge request modulos-npm/foca-admin-seguimiento!18
Showing
1 changed file
Show diff stats
src/js/osm-directive.js
| ... | ... | @@ -20,24 +20,24 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 20 | 20 | |
| 21 | 21 | if ($scope.parametros.actividad === 'Nota de pedido') { |
| 22 | 22 | observacion += |
| 23 | - 'Vendedor: ' + marcador.notaPedido[0].idVendedor + ' - ' + | |
| 23 | + 'Vendedor: ' + marcador.notaPedido.idVendedor + ' - ' + | |
| 24 | 24 | ( |
| 25 | - marcador.notaPedido[0].vendedor[0] ? | |
| 26 | - marcador.notaPedido[0].vendedor[0].NomVen : | |
| 25 | + marcador.notaPedido.vendedor ? | |
| 26 | + marcador.notaPedido.vendedor.NomVen : | |
| 27 | 27 | '' |
| 28 | 28 | ) + '<br/>'; |
| 29 | 29 | observacion += 'Fecha: ' + |
| 30 | 30 | $filter('date')(marcador.fecha.slice(0,10), 'dd/MM/yyyy') + ' ' + |
| 31 | 31 | marcador.fecha.slice(11,19) + '<br/>'; |
| 32 | 32 | observacion += 'Nº: ' + $filter('comprobante')([ |
| 33 | - marcador.notaPedido[0].sucursal, | |
| 34 | - marcador.notaPedido[0].numeroNotaPedido | |
| 33 | + marcador.notaPedido.sucursal, | |
| 34 | + marcador.notaPedido.numeroNotaPedido | |
| 35 | 35 | ]) + '<br/>'; |
| 36 | 36 | observacion += 'Cliente: ' + |
| 37 | - marcador.notaPedido[0].cliente[0].NOM + '<br/>'; | |
| 37 | + marcador.notaPedido.cliente.NOM + '<br/>'; | |
| 38 | 38 | if ($scope.parametros.individual) { |
| 39 | 39 | observacion += |
| 40 | - 'Total: ' + $filter('currency')(marcador.notaPedido[0].total, '$'); | |
| 40 | + 'Total: ' + $filter('currency')(marcador.notaPedido.total, '$'); | |
| 41 | 41 | } else { |
| 42 | 42 | observacion += 'Cantidad de nota de pedido: ' + |
| 43 | 43 | marcador.cantidad + '<br/>'; |
| ... | ... | @@ -46,31 +46,31 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 46 | 46 | } |
| 47 | 47 | } else { |
| 48 | 48 | observacion += 'Vehiculo: ' + |
| 49 | - marcador.remito[0].hojaRuta[0].idVehiculo + '<br/>'; | |
| 49 | + marcador.remito.hojaRuta.idVehiculo + '<br/>'; | |
| 50 | 50 | observacion += 'Fecha: ' + |
| 51 | 51 | $filter('date')(marcador.fecha.slice(0,10), 'dd/MM/yyyy') + ' ' + |
| 52 | 52 | marcador.fecha.slice(11,19) + '<br/>'; |
| 53 | 53 | observacion += 'Hoja de ruta: ' + $filter('comprobante')([ |
| 54 | - marcador.remito[0].hojaRuta[0].sucursal, | |
| 55 | - marcador.remito[0].hojaRuta[0].numeroHojaRuta | |
| 54 | + marcador.remito.hojaRuta.sucursal, | |
| 55 | + marcador.remito.hojaRuta.numeroHojaRuta | |
| 56 | 56 | ]) + '<br/>'; |
| 57 | 57 | observacion += 'Remito: ' + $filter('comprobante')([ |
| 58 | - marcador.remito[0].sucursal, | |
| 59 | - marcador.remito[0].numeroRemito | |
| 58 | + marcador.remito.sucursal, | |
| 59 | + marcador.remito.numeroRemito | |
| 60 | 60 | ]) + '<br/>'; |
| 61 | 61 | observacion += 'Cliente: ' + |
| 62 | - marcador.remito[0].cliente[0].NOM + '<br/>'; | |
| 62 | + marcador.remito.cliente.NOM + '<br/>'; | |
| 63 | 63 | if ($scope.parametros.individual) { |
| 64 | 64 | observacion += 'Producto: ' + |
| 65 | - marcador.remito[0].articuloRemito[0].descripcion + '<br/>'; | |
| 65 | + marcador.remito.articuloRemito.descripcion + '<br/>'; | |
| 66 | 66 | observacion += 'Cantidad entregada: ' + |
| 67 | - marcador.remito[0].carga + '<br/>'; | |
| 67 | + marcador.remito.carga + '<br/>'; | |
| 68 | 68 | } else { |
| 69 | 69 | observacion += 'Cantidad de entregas: ' + |
| 70 | 70 | marcador.cantidad + '<br/>'; |
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | - | |
| 73 | + | |
| 74 | 74 | $scope.markers.push( |
| 75 | 75 | L.marker([marcador.latitud, marcador.longitud]).addTo($scope.map) |
| 76 | 76 | .bindPopup(observacion) |