Commit 6effc0f5aef51861282f071fdfe6bed30c87b0a4
1 parent
add521cdc6
Exists in
develop
and in
1 other branch
Descomentado codigo
Showing
1 changed file
with
4 additions
and
4 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/dev/${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 | let dataPago = { | 24 | let dataPago = { |
25 | pedidoAnombreDe: '' | 25 | pedidoAnombreDe: '' |
26 | } | 26 | } |
27 | this.articuloService.pay(dataPago) | 27 | this.articuloService.pay(dataPago) |
28 | .subscribe((res: any) => { | 28 | .subscribe((res: any) => { |
29 | this.articuloService.idComanda = res.data; | 29 | this.articuloService.idComanda = res.data; |
30 | this.router.navigate(['mensaje-final']); | 30 | this.router.navigate(['mensaje-final']); |
31 | }, err => console.error(err)); | 31 | }, err => console.error(err)); |
32 | } | 32 | } |
33 | 33 | ||
34 | } | 34 | } |
35 | 35 |