Commit 20b8519a87b1df4329684e67af0037cfd1e0bba0
1 parent
31b8b1ab1f
Exists in
master
foca modal nuevo
Showing
1 changed file
with
27 additions
and
9 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -28,15 +28,33 @@ angular.module('focaActivarHojaRuta') |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $scope.seleccionarChofer = function() { |
| 31 | - var modalInstance = $uibModal.open( | |
| 32 | - { | |
| 33 | - ariaLabelledBy: 'Busqueda de Chofer', | |
| 34 | - templateUrl: 'modal-chofer.html', | |
| 35 | - controller: 'focaModalChoferController', | |
| 36 | - size: 'lg' | |
| 37 | - } | |
| 38 | - ); | |
| 39 | - modalInstance.result.then( | |
| 31 | + var parametrosModal = { | |
| 32 | + titulo: 'Búsqueda de Chofer', | |
| 33 | + query: '/chofer', | |
| 34 | + columnas: [ | |
| 35 | + { | |
| 36 | + propiedad: 'id', | |
| 37 | + nombre: 'Código', | |
| 38 | + filtro: { | |
| 39 | + nombre: 'rellenarDigitos', | |
| 40 | + parametro: 3 | |
| 41 | + } | |
| 42 | + }, | |
| 43 | + { | |
| 44 | + propiedad: 'nombre', | |
| 45 | + nombre: 'Nombre' | |
| 46 | + }, | |
| 47 | + { | |
| 48 | + propiedad: 'dni', | |
| 49 | + nombre: 'DNI' | |
| 50 | + }, | |
| 51 | + { | |
| 52 | + propiedad: 'telefono', | |
| 53 | + nombre: 'Teléfono' | |
| 54 | + } | |
| 55 | + ] | |
| 56 | + }; | |
| 57 | + focaModalService.modal(parametrosModal).then( | |
| 40 | 58 | function(chofer) { |
| 41 | 59 | $scope.chofer = chofer.id; |
| 42 | 60 | focaActivarHojaRutaService.getHojasRutas($scope.chofer) |