Commit 913e157901bb5deb0512163d69bc289fd96ebc7d

Authored by Eric Fernandez
1 parent 3b7fc55732
Exists in master

fuera modal chofer

Showing 1 changed file with 23 additions and 10 deletions   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', {