Commit 46a76ee1c0ec2d1bae558a286c378216a6843760
Exists in
master
Merge branch 'master' into 'master'
Master(mpuebla) See merge request !118
Showing
5 changed files
Show diff stats
.gitignore
src/app/components/confirmacion-carrito/confirmacion-carrito.component.html
... | ... | @@ -156,7 +156,7 @@ |
156 | 156 | <!-- EFECTIVO --> |
157 | 157 | <div |
158 | 158 | class="row card-effect card-forma-pago mx-1 my-3 rounded-sm shadow-sm bg-white" |
159 | - (click)="pagar('efectivo')"> | |
159 | + (click)="pagar(1)"> | |
160 | 160 | <div class="col-7 text-center my-auto px-2"> |
161 | 161 | <span class="h5 font-weight-bold">Efectivo</span> |
162 | 162 | </div> |
... | ... | @@ -182,7 +182,7 @@ |
182 | 182 | <!-- QR --> |
183 | 183 | <div |
184 | 184 | class="row card-effect card-forma-pago mx-1 my-3 rounded-sm shadow-sm bg-white" |
185 | - (click)="pagar('electronico')"> | |
185 | + (click)="pagar(9)"> | |
186 | 186 | <div class="col-7 text-center my-auto px-2"> |
187 | 187 | <span class="h5 font-weight-bold">Pago Electrónico</span> |
188 | 188 | </div> |
src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts
... | ... | @@ -75,9 +75,9 @@ export class ConfirmacionCarritoComponent implements OnInit, OnDestroy { |
75 | 75 | } |
76 | 76 | |
77 | 77 | //#region METODOS PARA LA FORMA DE PAGO |
78 | - pagar(medioPago: string) { | |
78 | + pagar(medioPago: number) { | |
79 | 79 | |
80 | - if (medioPago == 'electronico') { | |
80 | + if (medioPago === 9) { | |
81 | 81 | |
82 | 82 | this.verQR = true; |
83 | 83 | } |
... | ... | @@ -87,10 +87,10 @@ export class ConfirmacionCarritoComponent implements OnInit, OnDestroy { |
87 | 87 | |
88 | 88 | clearTimeout(this.timerReposo); |
89 | 89 | |
90 | - if (medioPago == 'efectivo') { | |
90 | + if (medioPago === 1) { | |
91 | 91 | |
92 | 92 | this.compraConEfectivofinalizada = true; |
93 | - } else if (medioPago == 'electronico') { | |
93 | + } else if (medioPago === 9) { | |
94 | 94 | |
95 | 95 | this.compraConQRfinalizada = true; |
96 | 96 | } |
src/app/services/cliente.service.ts
src/app/services/producto.service.ts
... | ... | @@ -80,7 +80,7 @@ export class ProductoService { |
80 | 80 | return this.http.get(`${appSettings.apiUrl}/categorias`); |
81 | 81 | } |
82 | 82 | |
83 | - pagar(medioPago: string) { | |
83 | + pagar(medioPago: number) { | |
84 | 84 | |
85 | 85 | return new Observable((observer) => { |
86 | 86 | |
... | ... | @@ -88,7 +88,8 @@ export class ProductoService { |
88 | 88 | |
89 | 89 | this.http.post(`${appSettings.apiUrl}/comprobante/guardar/${medioPago}`, { |
90 | 90 | productos: this.productos, |
91 | - cliente: cliente | |
91 | + cliente: cliente, | |
92 | + origen: 'autoservicio' | |
92 | 93 | }).subscribe((data) => { |
93 | 94 | |
94 | 95 | observer.next(data); |