Commit 8fd2c4e9bdfd9075720f1941575de09de4b2200b
Exists in
master
and in
2 other branches
Merge branch 'master' into 'master'
Master(efernandez) See merge request !42
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -132,20 +132,25 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
132 | 132 | }; |
133 | 133 | |
134 | 134 | $scope.seleccionarVehículo = function() { |
135 | - var modalInstance = $uibModal.open( | |
136 | - { | |
137 | - ariaLabelledBy: 'Busqueda de Transportista', | |
138 | - templateUrl: 'modal-proveedor.html', | |
139 | - controller: 'focaModalProveedorCtrl', | |
140 | - size: 'lg', | |
141 | - resolve: { | |
142 | - transportista: function() { | |
143 | - return true; | |
144 | - } | |
135 | + var parametrosModal = { | |
136 | + titulo: 'Búsqueda de Transportista', | |
137 | + query: '/transportista', | |
138 | + columnas: [ | |
139 | + { | |
140 | + nombre: 'Código', | |
141 | + propiedad: 'COD' | |
142 | + }, | |
143 | + { | |
144 | + nombre: 'Nombre', | |
145 | + propiedad: 'NOM' | |
146 | + }, | |
147 | + { | |
148 | + nombre: 'CUIT', | |
149 | + propiedad: 'CUIT' | |
145 | 150 | } |
146 | - } | |
147 | - ); | |
148 | - modalInstance.result.then(function(transportista) { | |
151 | + ] | |
152 | + }; | |
153 | + focaModalService.modal(parametrosModal).then(function(transportista) { | |
149 | 154 | $scope.selectVehiculo(transportista.COD, transportista.NOM); |
150 | 155 | }); |
151 | 156 | }; |