Commit d8e438d63041ac02a292b7950fc390caa5e2d24e

Authored by Eric Fernandez
1 parent ea4f42df1b
Exists in master and in 2 other branches develop, lab

quito modal transportista

Showing 1 changed file with 18 additions and 13 deletions   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 };