Commit 0e817b67e5c2696d5693700f73fe870ac18e82a0
1 parent
a36af12088
Exists in
develop
arreglo pago-tarjeta
Showing
2 changed files
with
9 additions
and
9 deletions
Show diff stats
src/app/modules/pago-tarjeta/pago-tarjeta.component.html
... | ... | @@ -18,11 +18,11 @@ |
18 | 18 | (contextmenu)="false" |
19 | 19 | class="img-in-top px-4 bg-white" |
20 | 20 | src="assets/img/icono-tarjetas.svg"> |
21 | - <p class="h6 m-0">AHORA ESPERE QUE SE ACTIVE EL POSNET</p> | |
21 | + <p class="h6 m-0">AHORA ESPERÁ QUE SE ACTIVE EL POSNET</p> | |
22 | 22 | <p class="h2 mb-3 text-secondary"> |
23 | 23 | deslice su tarjeta |
24 | 24 | </p> |
25 | - <p class="h6 m-0">Y SIGA LAS INSTRUCCIONES DEL LECTOR</p> | |
25 | + <p class="h6 m-0">Y SEGUÍ LAS INSTRUCCIONES DEL LECTOR</p> | |
26 | 26 | </div> |
27 | 27 | </div> |
28 | 28 | <div class="row mt-5 justify-content-center arrow-slide arrow-delay-1"> |
... | ... | @@ -60,11 +60,11 @@ |
60 | 60 | |
61 | 61 | <ng-template #template> |
62 | 62 | <div class="modal-body rounded bg-primary"> |
63 | - <h1 class="text-white text-center my-4">Por favor,<br>espera un momento</h1> | |
63 | + <h1 class="text-white text-center my-4">Por favor,<br>esperá un momento</h1> | |
64 | 64 | <div class="d-flex justify-content-center mt-2 mb-4"> |
65 | 65 | <div class="spinner-border text-white text-center" role="status"> |
66 | 66 | <span class="sr-only">Loading...</span> |
67 | 67 | </div> |
68 | 68 | </div> |
69 | 69 | </div> |
70 | 70 | -</ng-template> |
71 | +</ng-template> | |
71 | 72 | \ No newline at end of file |
src/app/modules/pago-tarjeta/pago-tarjeta.component.ts
1 | 1 | import { Component, OnInit, TemplateRef, OnDestroy, ViewChild } from '@angular/core'; |
2 | 2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
3 | 3 | import { Router } from '@angular/router'; |
4 | -import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; | |
4 | +import { BsModalService } from 'ngx-bootstrap/modal'; | |
5 | 5 | import { ErrorFormaPagoComponent } from 'src/app/shared/error-forma-pago/error-forma-pago.component'; |
6 | 6 | |
7 | 7 | @Component({ |
... | ... | @@ -12,7 +12,6 @@ import { ErrorFormaPagoComponent } from 'src/app/shared/error-forma-pago/error-f |
12 | 12 | export class PagoTarjetaComponent implements OnInit, OnDestroy { |
13 | 13 | timer: any; |
14 | 14 | @ViewChild('template', {static: true}) public template: TemplateRef<any>; |
15 | - modalRef: BsModalRef; | |
16 | 15 | |
17 | 16 | constructor( |
18 | 17 | private articuloService: ArticuloService, |
... | ... | @@ -31,11 +30,9 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy { |
31 | 30 | }; |
32 | 31 | this.articuloService.pay(dataPago) |
33 | 32 | .subscribe((res: any) => { |
34 | - this.modalRef.hide(); | |
35 | 33 | this.articuloService.idComanda = res.data; |
36 | 34 | this.router.navigate(['mensaje-final']); |
37 | 35 | }, (err) => { |
38 | - this.modalRef.hide(); | |
39 | 36 | this.modalService.show(ErrorFormaPagoComponent, { |
40 | 37 | class: 'modal-lg modal-dialog-centered', |
41 | 38 | ignoreBackdropClick: true, |
... | ... | @@ -58,6 +55,9 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy { |
58 | 55 | } |
59 | 56 | |
60 | 57 | openModalEspera(templateRef: TemplateRef<any>) { |
61 | - this.modalRef = this.modalService.show(templateRef, { class: 'modal-lg modal-dialog-centered' }); | |
58 | + const modalRef = this.modalService.show(templateRef, { class: 'modal-lg modal-dialog-centered' }); | |
59 | + this.timer = setTimeout(() => { | |
60 | + modalRef.hide(); | |
61 | + }, 6000); | |
62 | 62 | } |
63 | 63 | } |