diff --git a/src/app/modules/pago-tarjeta/pago-tarjeta.component.html b/src/app/modules/pago-tarjeta/pago-tarjeta.component.html index 21c4138..fc90b92 100644 --- a/src/app/modules/pago-tarjeta/pago-tarjeta.component.html +++ b/src/app/modules/pago-tarjeta/pago-tarjeta.component.html @@ -18,11 +18,11 @@ (contextmenu)="false" class="img-in-top px-4 bg-white" src="assets/img/icono-tarjetas.svg"> -

AHORA ESPERE QUE SE ACTIVE EL POSNET

+

AHORA ESPERÁ QUE SE ACTIVE EL POSNET

deslice su tarjeta

-

Y SIGA LAS INSTRUCCIONES DEL LECTOR

+

Y SEGUÍ LAS INSTRUCCIONES DEL LECTOR

@@ -60,11 +60,11 @@ - + \ No newline at end of file diff --git a/src/app/modules/pago-tarjeta/pago-tarjeta.component.ts b/src/app/modules/pago-tarjeta/pago-tarjeta.component.ts index 93343ca..6c5d3d3 100644 --- a/src/app/modules/pago-tarjeta/pago-tarjeta.component.ts +++ b/src/app/modules/pago-tarjeta/pago-tarjeta.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, TemplateRef, OnDestroy, ViewChild } from '@angular/core'; import { ArticuloService } from 'src/app/services/articulo/articulo.service'; import { Router } from '@angular/router'; -import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; +import { BsModalService } from 'ngx-bootstrap/modal'; import { ErrorFormaPagoComponent } from 'src/app/shared/error-forma-pago/error-forma-pago.component'; @Component({ @@ -12,7 +12,6 @@ import { ErrorFormaPagoComponent } from 'src/app/shared/error-forma-pago/error-f export class PagoTarjetaComponent implements OnInit, OnDestroy { timer: any; @ViewChild('template', {static: true}) public template: TemplateRef; - modalRef: BsModalRef; constructor( private articuloService: ArticuloService, @@ -31,11 +30,9 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy { }; this.articuloService.pay(dataPago) .subscribe((res: any) => { - this.modalRef.hide(); this.articuloService.idComanda = res.data; this.router.navigate(['mensaje-final']); }, (err) => { - this.modalRef.hide(); this.modalService.show(ErrorFormaPagoComponent, { class: 'modal-lg modal-dialog-centered', ignoreBackdropClick: true, @@ -58,6 +55,9 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy { } openModalEspera(templateRef: TemplateRef) { - this.modalRef = this.modalService.show(templateRef, { class: 'modal-lg modal-dialog-centered' }); + const modalRef = this.modalService.show(templateRef, { class: 'modal-lg modal-dialog-centered' }); + this.timer = setTimeout(() => { + modalRef.hide(); + }, 6000); } }