Commit 841c0f19f230cb2d9247d4abfdb865d66cac5dba

Authored by Marcelo Puebla
Exists in develop

Merge branch 'develop' into 'develop'

Develop

See merge request !156
src/app/app-routing.module.ts
... ... @@ -39,7 +39,7 @@ const routes: Routes = [
39 39 loadChildren: () => import('./modules/pago-electronico/pago-electronico.module').then(m => m.PagoElectronicoModule)
40 40 },
41 41 {
42   - path: 'pago-tarjeta',
  42 + path: 'pago-tarjeta/:contactLess',
43 43 loadChildren: () => import('./modules/pago-tarjeta/pago-tarjeta.module').then(m => m.PagoTarjetaModule)
44 44 },
45 45 ]
src/app/modules/indicaciones-pago-tarjeta/indicaciones-pago-tarjeta.component.html
... ... @@ -16,7 +16,7 @@
16 16 class="p-5 mx-auto mt-4 h-30 align-self-center
17 17 btn-effect border border-primary rounded reduce-card-1"
18 18 [ngClass]="card.classList.contains('media-pantalla') ? 'col-md-4' : 'col-md-8'"
19   - [routerLink]="['/pago-tarjeta']">
  19 + [routerLink]="['/pago-tarjeta/false']">
20 20 <div class="row h-auto">
21 21 <div [ngClass]="card.classList.contains('media-pantalla') ? 'col-12' : 'col-4'">
22 22 <img
... ... @@ -57,7 +57,7 @@
57 57 class="p-5 mx-auto mt-6 h-auto align-self-center
58 58 btn-effect border border-primary rounded reduce-card-1"
59 59 [ngClass]="card.classList.contains('media-pantalla') ? 'col-md-4' : 'col-md-8'"
60   - [routerLink]="['/pago-tarjeta']">
  60 + [routerLink]="['/pago-tarjeta/false']">
61 61 <div class="row h-auto">
62 62 <div [ngClass]="card.classList.contains('media-pantalla') ? 'col-12' : 'col-4'">
63 63 <img
... ... @@ -101,7 +101,7 @@
101 101 class="col-sm-10 col-md-4 p-5 mx-auto mt-6 align-self-center
102 102 btn-effect border border-primary rounded reduce-card-1"
103 103 [ngClass]="card.classList.contains('media-pantalla') ? 'col-md-4' : 'col-md-8'"
104   - [routerLink]="['/pago-tarjeta']">
  104 + [routerLink]="['/pago-tarjeta/true']">
105 105 <div class="row h-auto">
106 106 <div [ngClass]="card.classList.contains('media-pantalla') ? 'col-12' : 'col-4'">
107 107 <img
src/app/modules/pago-tarjeta/pago-tarjeta.component.html
... ... @@ -18,11 +18,10 @@
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 ESPERÁ QUE SE ACTIVE EL POSNET</p>
  21 + <p class="h6 m-0">AHORA ESPERÁ QUE SE ACTIVE EL POSNET Y</p>
22 22 <p class="h2 mb-3 text-secondary">
23   - deslizá tu tarjeta
  23 + seguí las instrucciones
24 24 </p>
25   - <p class="h6 m-0">Y SEGUÍ LAS INSTRUCCIONES DEL LECTOR</p>
26 25 </div>
27 26 </div>
28 27 <div class="row mt-5 justify-content-center arrow-slide arrow-delay-1">
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   -import { Router } from '@angular/router';
  3 +import { Router, ActivatedRoute } from '@angular/router';
4 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';
... ... @@ -12,12 +12,13 @@ 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 + @ViewChild('template', { static: true }) public template: TemplateRef<any>;
16 16 subscription: Subscription;
17 17  
18 18 constructor(
19 19 private articuloService: ArticuloService,
20 20 private router: Router,
  21 + private route: ActivatedRoute,
21 22 private modalService: BsModalService,
22 23 ) { }
23 24  
... ... @@ -26,10 +27,11 @@ export class PagoTarjetaComponent implements OnInit, OnDestroy {
26 27 this.router.navigate(['']);
27 28 return;
28 29 }
29   - this.openModalEspera(this.template);
30 30 const dataPago = {
31   - pedidoAnombreDe: ''
  31 + pedidoAnombreDe: '',
  32 + contactLess: this.route.snapshot.params.contactLess
32 33 };
  34 + this.openModalEspera(this.template);
33 35 this.subscription = this.articuloService.pay(dataPago)
34 36 .subscribe((res: any) => {
35 37 this.articuloService.idComanda = res.data;
src/app/services/articulo/articulo.service.ts
... ... @@ -87,7 +87,7 @@ export class ArticuloService {
87 87 numeroPlanilla: APP_SETTINGS.numeroPlanilla,
88 88 pedidoParaLlevar: localStorage.getItem('pedidoParaLlevar'),
89 89 terminal: APP_SETTINGS.terminal,
90   - contactLess: true,
  90 + contactLess: dataPago.contactLess === 'true' ? true : false,
91 91 })
92 92 .subscribe((data) => {
93 93 observer.next(data);