Commit 92521b388e83d3a4e3eb203ca2b6f45d35d77ec8
1 parent
1a818011ea
Exists in
master
and in
1 other branch
Agregué foca-modal-moneda.
Showing
1 changed file
with
18 additions
and
1 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('focaCrearNotaPedido') |
| 3 | 3 | ['$scope', '$uibModal', 'crearNotaPedidoService', 'focaModalService', |
| 4 | 4 | function($scope, $uibModal, crearNotaPedidoService, focaModalService) { |
| 5 | 5 | $scope.botonera = [ |
| 6 | - {texto: 'moneda', accion: function() {console.log('moneda');}}, | |
| 6 | + {texto: 'moneda', accion: function() {$scope.abrirModalMoneda();}}, | |
| 7 | 7 | { |
| 8 | 8 | texto: 'precios y condiciones', |
| 9 | 9 | accion: function() {$scope.abrirModalListaPrecio();}}, |
| ... | ... | @@ -283,6 +283,23 @@ angular.module('focaCrearNotaPedido') |
| 283 | 283 | } |
| 284 | 284 | ); |
| 285 | 285 | }; |
| 286 | + $scope.abrirModalMoneda = function() { | |
| 287 | + var modalInstance = $uibModal.open( | |
| 288 | + { | |
| 289 | + ariaLabelledBy: 'Busqueda de Moneda', | |
| 290 | + templateUrl: 'modal-moneda.html', | |
| 291 | + controller: 'focaModalMonedaController', | |
| 292 | + size: 'lg' | |
| 293 | + } | |
| 294 | + ); | |
| 295 | + modalInstance.result.then( | |
| 296 | + function(moneda) { | |
| 297 | + console.log('moneda', moneda); | |
| 298 | + }, function() { | |
| 299 | + | |
| 300 | + } | |
| 301 | + ); | |
| 302 | + }; | |
| 286 | 303 | $scope.agregarATabla = function(key) { |
| 287 | 304 | if(key === 13) { |
| 288 | 305 | if($scope.articuloACargar.cantidad === undefined || |