Commit bddcdadb7b9256de6792c001518a8cb7941e3914
1 parent
e6a411fa2a
Exists in
develop
Change
En url de qr de pago electronico
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/app/modules/pago-electronico/pago-electronico.component.ts
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; | 2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
3 | import { Router } from '@angular/router'; | 3 | import { Router } from '@angular/router'; |
4 | import { APP_SETTINGS } from 'src/etc/AppSettings'; | 4 | import { APP_SETTINGS } from 'src/etc/AppSettings'; |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
7 | selector: 'app-pago-electronico', | 7 | selector: 'app-pago-electronico', |
8 | templateUrl: './pago-electronico.component.html', | 8 | templateUrl: './pago-electronico.component.html', |
9 | styleUrls: ['./pago-electronico.component.scss'] | 9 | styleUrls: ['./pago-electronico.component.scss'] |
10 | }) | 10 | }) |
11 | export class PagoElectronicoComponent implements OnInit { | 11 | export class PagoElectronicoComponent implements OnInit { |
12 | urlQr = `${APP_SETTINGS.apiDeboSuite}/qr/dev/${APP_SETTINGS.codigoP}/tienda/${APP_SETTINGS.terminal}`; | 12 | urlQr = `${APP_SETTINGS.apiDeboSuite}/qr/${APP_SETTINGS.deploy}/${APP_SETTINGS.codigoP}/tienda/${APP_SETTINGS.terminal}`; |
13 | 13 | ||
14 | constructor( | 14 | constructor( |
15 | private articuloService: ArticuloService, | 15 | private articuloService: ArticuloService, |
16 | private router: Router, | 16 | private router: Router, |
17 | ) { } | 17 | ) { } |
18 | 18 | ||
19 | ngOnInit() { | 19 | ngOnInit() { |
20 | if (!this.articuloService.carrito.length) { | 20 | if (!this.articuloService.carrito.length) { |
21 | this.router.navigate(['']); | 21 | this.router.navigate(['']); |
22 | return; | 22 | return; |
23 | } | 23 | } |
24 | const dataPago = { | 24 | const dataPago = { |
25 | pedidoAnombreDe: '' | 25 | pedidoAnombreDe: '' |
26 | }; | 26 | }; |
27 | dataPago.pedidoAnombreDe = ''; | 27 | dataPago.pedidoAnombreDe = ''; |
28 | this.articuloService.pay(dataPago) | 28 | this.articuloService.pay(dataPago) |
29 | .subscribe((res: any) => { | 29 | .subscribe((res: any) => { |
30 | this.articuloService.idComanda = res.data; | 30 | this.articuloService.idComanda = res.data; |
31 | this.router.navigate(['mensaje-final']); | 31 | this.router.navigate(['mensaje-final']); |
32 | }, err => console.error(err)); | 32 | }, err => console.error(err)); |
33 | } | 33 | } |
34 | 34 | ||
35 | } | 35 | } |
36 | 36 |