Commit b299c5cf8e0c9c40dd6491f7cc06a3f9abd0021a
1 parent
8ccb80fcda
Exists in
master
and in
1 other branch
medio de pago
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
src/app/components/pago/pago.component.html
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | <div class="col-4 p-2"> |
31 | 31 | <div |
32 | 32 | class="bg-white rounded-sm shadow border-0" |
33 | - (click)="pagoEfectivo()"> | |
33 | + (click)="pagoEfectivo('efectivo')"> | |
34 | 34 | <img src="{{apiUrl}}/imagenes/efectivo.png" class="rounded-sm w-75 py-2 mx-auto d-block"> |
35 | 35 | <div class="p-2 card-text text-center"> |
36 | 36 | <p class="h6 text-center m-0">Efectivo</p> |
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | <div class="col-4 p-2"> |
49 | 49 | <div |
50 | 50 | class="bg-white rounded-sm shadow border-0" |
51 | - (click)="pagar()"> | |
51 | + (click)="pagar('electronico')"> | |
52 | 52 | <img src="{{apiUrl}}/imagenes/qr.png" class="rounded-sm w-75 py-2 mx-auto d-block"> |
53 | 53 | <div class="p-2 card-text text-center"> |
54 | 54 | <p class="h6 text-center m-0">Pago Electrónico</p> |
src/app/components/pago/pago.component.ts
... | ... | @@ -51,11 +51,11 @@ export class PagoComponent implements OnInit, OnDestroy { |
51 | 51 | }, 3000); |
52 | 52 | } |
53 | 53 | |
54 | - pagar() { | |
54 | + pagar(medioPago: string) { | |
55 | 55 | |
56 | 56 | this.verQR = true; |
57 | 57 | |
58 | - this.productoService.pagar() | |
58 | + this.productoService.pagar(medioPago) | |
59 | 59 | .subscribe(() => { |
60 | 60 | |
61 | 61 | clearTimeout(this.timerReposo); |
src/app/services/producto.service.ts
... | ... | @@ -77,8 +77,8 @@ export class ProductoService { |
77 | 77 | return this.http.get(`${appSettings.apiUrl}/categorias`); |
78 | 78 | } |
79 | 79 | |
80 | - pagar() { | |
81 | - return this.http.post(`${appSettings.apiUrl}/comprobante/guardar`, { | |
80 | + pagar(medioPago: string) { | |
81 | + return this.http.post(`${appSettings.apiUrl}/comprobante/guardar/${medioPago}`, { | |
82 | 82 | productos: this.productos |
83 | 83 | }); |
84 | 84 | } |