Commit 9de0f5d61ea496e3d14a09f557626e919712c0cf
Exists in
develop
Merge branch 'develop' into 'develop'
Fix Ruta del qr See merge request !74
Showing
2 changed files
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/${APP_SETTINGS.numeroPlanilla}/${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 | this.mediaPantalla(); | 33 | this.mediaPantalla(); |
34 | } | 34 | } |
35 | mediaPantalla() { | 35 | mediaPantalla() { |
36 | if ($('body').hasClass('media-pantalla')) { | 36 | if ($('body').hasClass('media-pantalla')) { |
37 | $('.qr-mt').addClass('media-pantalla'); | 37 | $('.qr-mt').addClass('media-pantalla'); |
38 | } | 38 | } |
39 | } | 39 | } |
40 | } | 40 | } |
41 | 41 |
src/app/shared/sinonimo/sinonimo.component.html
1 | <div class="bg-primary rounded text-white"> | 1 | <div class="bg-primary rounded text-white"> |
2 | <div class="modal-header"> | 2 | <div class="modal-header"> |
3 | <p class="h4 col-6 px-0 align-self-center">Eliga opciones {{sinonimos.length}}</p> | 3 | <p class="h4 col-6 px-0 align-self-center">Eliga opciones {{sinonimos.length}}</p> |
4 | <div class="col-6 text-right"> | 4 | <div class="col-6 text-right"> |
5 | <p *ngFor="let s of sinonimos; let i = index"> | 5 | <p *ngFor="let s of sinonimos; let i = index"> |
6 | <span | 6 | <span |
7 | class="pr-2 btn-effect" | 7 | class="btn-effect" |
8 | (click)="scrollTo(i)"> | 8 | (click)="scrollTo(i)"> |
9 | Ir a opción {{i+1}}</span> | 9 | Ir a opción {{i+1}} |
10 | <i class="far fa-hand-point-left"></i> | 10 | <i class="far fa-hand-point-left"></i> |
11 | </span> | ||
11 | </p> | 12 | </p> |
12 | </div> | 13 | </div> |
13 | </div> | 14 | </div> |
14 | 15 | ||
15 | <div class="modal-body lista-sinonimos scroll-y-visible my-2 mr-2"> | 16 | <div class="modal-body lista-sinonimos scroll-y-visible my-2 mr-2"> |
16 | <div *ngFor="let s of sinonimos; let i = index"> | 17 | <div *ngFor="let s of sinonimos; let i = index"> |
17 | <div [id]="i"></div> | 18 | <div [id]="i"></div> |
18 | <hr [hidden]="i === 0" class="bg-white"> | 19 | <hr [hidden]="i === 0" class="bg-white"> |
19 | <div *ngFor="let articulo of s.productos"> | 20 | <div *ngFor="let articulo of s.productos"> |
20 | <div class="custom-control custom-checkbox"> | 21 | <div class="custom-control custom-checkbox"> |
21 | <input | 22 | <input |
22 | type="checkbox" | 23 | type="checkbox" |
23 | class="custom-control-input" | 24 | class="custom-control-input" |
24 | [(ngModel)]="articulo.seleccionado" | 25 | [(ngModel)]="articulo.seleccionado" |
25 | (click)="selectSinonimo(i, articulo)" | 26 | (click)="selectSinonimo(i, articulo)" |
26 | [id]="articulo.id"> | 27 | [id]="articulo.id"> |
27 | <label | 28 | <label |
28 | class="custom-control-label" | 29 | class="custom-control-label" |
29 | [for]="articulo.id"> | 30 | [for]="articulo.id"> |
30 | {{articulo.DET_LAR.toUpperCase()}} | 31 | {{articulo.DET_LAR.toUpperCase()}} |
31 | </label> | 32 | </label> |
32 | </div> | 33 | </div> |
33 | </div> | 34 | </div> |
34 | </div> | 35 | </div> |
35 | </div> | 36 | </div> |
36 | 37 | ||
37 | <div class="modal-footer"> | 38 | <div class="modal-footer"> |
38 | <div | 39 | <div |
39 | [ngClass]="validate()" | 40 | [ngClass]="validate()" |
40 | class="d-inline-block py-1 bg-white badge-pill text-primary" | 41 | class="d-inline-block py-1 bg-white badge-pill text-primary" |
41 | (click)="continue()"> | 42 | (click)="continue()"> |
42 | CONTINUAR | 43 | CONTINUAR |
43 | <img | 44 | <img |
44 | draggable="false" | 45 | draggable="false" |
45 | ondragstart="return false;" | 46 | ondragstart="return false;" |
46 | (contextmenu)="false" | 47 | (contextmenu)="false" |
47 | class="icon-30" | 48 | class="icon-30" |
48 | src="assets/img/ir-color.svg"> | 49 | src="assets/img/ir-color.svg"> |
49 | </div> | 50 | </div> |
50 | </div> | 51 | </div> |
51 | </div> | 52 | </div> |
52 | 53 |