Commit 2a229bdfd558ffa5a033f73aa423c93b009426bc
1 parent
f23f33bcfb
Exists in
master
Nombre e ID transportista
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -26,6 +26,7 @@ angular.module('focaAbmVehiculo') |
| 26 | 26 | $scope.editar = function (id) { |
| 27 | 27 | $location.path('/vehiculo/' + id + '/' + $scope.idTransportista); |
| 28 | 28 | }; |
| 29 | + | |
| 29 | 30 | $scope.solicitarConfirmacion = function (vehiculo) { |
| 30 | 31 | focaModalService.confirm('¿Está seguro que desea borrar el vehiculo ' + |
| 31 | 32 | vehiculo.id + ' ' + vehiculo.tractor + ' ?').then( |
| ... | ... | @@ -117,12 +118,12 @@ angular.module('focaAbmVehiculo') |
| 117 | 118 | focaAbmVehiculoService |
| 118 | 119 | .getTransportistaPorId($routeParams.idTransportista) |
| 119 | 120 | .then(function (res) { |
| 120 | - var codigo = ('00000' + res.data.COD).slice(-5); | |
| 121 | - $scope.vehiculo.idTransportista = res.data.COD; | |
| 121 | + var codigo = ('00000' + res.data[0].COD).slice(-5); | |
| 122 | + $scope.vehiculo.idTransportista = res.data[0].COD; | |
| 122 | 123 | $scope.vehiculo.transportista = res.data; |
| 123 | 124 | $scope.$broadcast('addCabecera', { |
| 124 | 125 | label: 'Transportista:', |
| 125 | - valor: codigo + ' - ' + res.data.NOM | |
| 126 | + valor: codigo + ' - ' + res.data[0].ALI | |
| 126 | 127 | }); |
| 127 | 128 | }); |
| 128 | 129 | } |