Commit 73eb209158758d4e2b51f9f782f03d1ee10106c1
1 parent
68c833dfe7
Exists in
master
and in
1 other branch
save on efectivo
Showing
2 changed files
with
16 additions
and
9 deletions
Show diff stats
src/app/components/confirmacion-carrito/confirmacion-carrito.component.html
| ... | ... | @@ -117,7 +117,7 @@ |
| 117 | 117 | </p> |
| 118 | 118 | </div> |
| 119 | 119 | </div> |
| 120 | - </div> | |
| 120 | + </div> | |
| 121 | 121 | </div> |
| 122 | 122 | |
| 123 | 123 | <!-- OPCIONES ABAJO DERECHA --> |
| ... | ... | @@ -156,17 +156,17 @@ |
| 156 | 156 | <!-- EFECTIVO --> |
| 157 | 157 | <div |
| 158 | 158 | class="row card-effect mx-1 my-3 rounded-sm shadow-sm bg-white" |
| 159 | - (click)="pagoEfectivo('efectivo')"> | |
| 159 | + (click)="pagar('efectivo')"> | |
| 160 | 160 | <div class="col-7 text-center my-auto py-3 px-2"> |
| 161 | 161 | <span class="h5">Efectivo</span> |
| 162 | 162 | </div> |
| 163 | 163 | <div class="col-5 my-auto p-0"> |
| 164 | 164 | <img |
| 165 | - src="{{apiImagenes}}/imagenes/efectivo.png" | |
| 166 | - class="w-50 float-right mr-3"> | |
| 165 | + src="{{apiImagenes}}/imagenes/efectivo.png" | |
| 166 | + class="w-50 float-right mr-3"> | |
| 167 | 167 | </div> |
| 168 | 168 | </div> |
| 169 | - | |
| 169 | + | |
| 170 | 170 | <!-- TARJETA --> |
| 171 | 171 | <div class="row card-effect mx-1 my-3 rounded-sm shadow-sm bg-white"> |
| 172 | 172 | <div class="col-7 text-center my-auto py-3 px-2"> |
| ... | ... | @@ -178,7 +178,7 @@ |
| 178 | 178 | class="w-50 float-right mr-3"> |
| 179 | 179 | </div> |
| 180 | 180 | </div> |
| 181 | - | |
| 181 | + | |
| 182 | 182 | <!-- QR --> |
| 183 | 183 | <div |
| 184 | 184 | class="row card-effect mx-1 my-3 rounded-sm shadow-sm bg-white" |
src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts
| ... | ... | @@ -81,13 +81,20 @@ export class ConfirmacionCarritoComponent implements OnInit, OnDestroy { |
| 81 | 81 | |
| 82 | 82 | pagar(medioPago: string) { |
| 83 | 83 | |
| 84 | - this.verQR = true; | |
| 85 | - | |
| 86 | 84 | this.productoService.pagar(medioPago) |
| 87 | 85 | .subscribe(() => { |
| 88 | 86 | |
| 89 | 87 | clearTimeout(this.timerReposo); |
| 90 | - this.compraConQRfinalizada = true; | |
| 88 | + | |
| 89 | + if (medioPago == 'efectivo') { | |
| 90 | + | |
| 91 | + this.compraConEfectivofinalizada = true; | |
| 92 | + } else if (medioPago == 'electronico') { | |
| 93 | + | |
| 94 | + this.compraConQRfinalizada = true; | |
| 95 | + this.verQR = true; | |
| 96 | + } | |
| 97 | + | |
| 91 | 98 | setTimeout(() => { |
| 92 | 99 | |
| 93 | 100 | this.router.navigate(['mensaje-final']); |