Commit e635d1e96efed2abfb074a867727b5a303b993a5
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master See merge request !66
Showing
3 changed files
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="{{apiImagenes}}/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="{{apiImagenes}}/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
| ... | ... | @@ -86,8 +86,8 @@ export class ProductoService { |
| 86 | 86 | return this.http.get(`${appSettings.apiUrl}/categorias`); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - pagar() { | |
| 90 | - return this.http.post(`${appSettings.apiUrl}/comprobante/guardar`, { | |
| 89 | + pagar(medioPago: string) { | |
| 90 | + return this.http.post(`${appSettings.apiUrl}/comprobante/guardar/${medioPago}`, { | |
| 91 | 91 | productos: this.productos |
| 92 | 92 | }); |
| 93 | 93 | } |