Commit 7ead2bdea5f89ef8afa8d70602595057ac11cc22
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master(mpuebla) See merge request !2
Showing
3 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -6,13 +6,13 @@ angular.module('focaModalFormaPago') |
6 | 6 | $uibModalInstance, focaModalFormaPagoService) { |
7 | 7 | |
8 | 8 | //#region Variables |
9 | - $scope.botonesTarjetas = []; | |
9 | + $scope.botones = []; | |
10 | 10 | //#endregion |
11 | 11 | |
12 | 12 | init(); |
13 | 13 | |
14 | 14 | function init() { |
15 | - $scope.botonesTarjetas = focaModalFormaPagoService.getBotonera(); | |
15 | + $scope.botones = focaModalFormaPagoService.getBotonera(); | |
16 | 16 | } |
17 | 17 | |
18 | 18 | $scope.seleccionarContado = function () { |
... | ... | @@ -30,7 +30,7 @@ angular.module('focaModalFormaPago') |
30 | 30 | 'focaModalTarjetasController'); |
31 | 31 | modalInstance.result |
32 | 32 | .then(function (data) { |
33 | - console.log(data); | |
33 | + $uibModalInstance.close(data); | |
34 | 34 | }) |
35 | 35 | .catch(function (e) { console.error(e); }); |
36 | 36 | }; |
... | ... | @@ -82,10 +82,6 @@ angular.module('focaModalFormaPago') |
82 | 82 | $scope.cancel = function () { |
83 | 83 | $uibModalInstance.dismiss('cancel'); |
84 | 84 | }; |
85 | - | |
86 | - $scope.select = function (iva) { | |
87 | - $uibModalInstance.close(iva); | |
88 | - }; | |
89 | 85 | }] |
90 | 86 | ) |
91 | 87 | .controller('focaModalTarjetasController', [ |
... | ... | @@ -112,8 +108,8 @@ angular.module('focaModalFormaPago') |
112 | 108 | $uibModalInstance.dismiss('cancel'); |
113 | 109 | }; |
114 | 110 | |
115 | - $scope.select = function (iva) { | |
116 | - $uibModalInstance.close(iva); | |
111 | + $scope.aceptarFormaDePago = function () { | |
112 | + $uibModalInstance.close('data de tarjeta'); | |
117 | 113 | }; |
118 | 114 | |
119 | 115 | function animateForm() { |
src/views/modal-forma-pago.html
src/views/modal-tarjetas.html
... | ... | @@ -64,7 +64,12 @@ |
64 | 64 | </div> |
65 | 65 | |
66 | 66 | |
67 | -<div class="modal-footer d-flex justify-content-between"> | |
67 | +<div class="modal-footer d-flex" ng-class="{ 'justify-content-between': showForm }"> | |
68 | 68 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> |
69 | - <button class="btn btn-sm btn-primary" type="button" ng-click="cancel()">Aceptar</button> | |
69 | + <button | |
70 | + class="btn btn-sm btn-primary" | |
71 | + type="button" | |
72 | + ng-click="aceptarFormaDePago()" | |
73 | + ng-show="showForm">Aceptar | |
74 | + </button> | |
70 | 75 | </div> |