Commit 55889f9c8d35b0653299b78f8bab3328af5178fd
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master(efernandez) See merge request !19
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -153,16 +153,29 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
153 | 153 | }; |
154 | 154 | |
155 | 155 | $scope.seleccionarChofer = function() { |
156 | - var modalInstance = $uibModal.open( | |
157 | - { | |
158 | - ariaLabelledBy: 'Busqueda de Chofer', | |
159 | - templateUrl: 'modal-chofer.html', | |
160 | - controller: 'focaModalChoferController', | |
161 | - size: 'lg' | |
162 | - } | |
163 | - ); | |
164 | - | |
165 | - modalInstance.result.then( | |
156 | + var parametrosModal = { | |
157 | + titulo: 'Búsqueda de Chofer', | |
158 | + query: '/chofer', | |
159 | + columnas: [ | |
160 | + { | |
161 | + propiedad: 'id', | |
162 | + nombre: 'Código' | |
163 | + }, | |
164 | + { | |
165 | + propiedad: 'nombre', | |
166 | + nombre: 'Nombre' | |
167 | + }, | |
168 | + { | |
169 | + propiedad: 'dni', | |
170 | + nombre: 'DNI' | |
171 | + }, | |
172 | + { | |
173 | + propiedad: 'telefono', | |
174 | + nombre: 'Teléfono' | |
175 | + } | |
176 | + ] | |
177 | + }; | |
178 | + focaModalService.modal(parametrosModal).then( | |
166 | 179 | function(chofer) { |
167 | 180 | $scope.hojaRuta.chofer = chofer; |
168 | 181 | $scope.$broadcast('addCabecera', { |