Commit c886fbe1c054c3f3fd2947aa066ccf0b67fd1f1e

Authored by Marcelo Puebla
Exists in develop

Merge branch 'master' into 'develop'

Master(benjamin)

See merge request !102
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,7 +60,7 @@
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>
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 import { Subscription } from 'rxjs';
7 7  
... ... @@ -12,9 +12,8 @@ import { Subscription } from &#39;rxjs&#39;;
12 12 })
13 13 export class PagoTarjetaComponent implements OnInit, OnDestroy {
14 14 timer: any;
  15 + @ViewChild('template', {static: true}) public template: TemplateRef<any>;
15 16 subscription: Subscription;
16   - modalRef: BsModalRef;
17   - @ViewChild('template', { static: true }) public template: TemplateRef<any>;
18 17  
19 18 constructor(
20 19 private articuloService: ArticuloService,
... ... @@ -33,11 +32,9 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy {
33 32 };
34 33 this.subscription = this.articuloService.pay(dataPago)
35 34 .subscribe((res: any) => {
36   - this.modalRef.hide();
37 35 this.articuloService.idComanda = res.data;
38 36 this.router.navigate(['mensaje-final']);
39 37 }, (err) => {
40   - this.modalRef.hide();
41 38 this.modalService.show(ErrorFormaPagoComponent, {
42 39 class: 'modal-lg modal-dialog-centered',
43 40 ignoreBackdropClick: true,
... ... @@ -61,6 +58,9 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy {
61 58 }
62 59  
63 60 openModalEspera(templateRef: TemplateRef<any>) {
64   - this.modalRef = this.modalService.show(templateRef, { class: 'modal-lg modal-dialog-centered' });
  61 + const modalRef = this.modalService.show(templateRef, { class: 'modal-lg modal-dialog-centered' });
  62 + this.timer = setTimeout(() => {
  63 + modalRef.hide();
  64 + }, 6000);
65 65 }
66 66 }