Commit f6197c11d6b957328c21f219d02fda23f8c32a38
1 parent
55145dded6
Exists in
master
Arreglo para la cantidad.
Showing
2 changed files
with
11 additions
and
1 deletions
Show diff stats
src/app/components/confirmacion-carrito/confirmacion-carrito.component.html
src/app/components/sidebar/sidebar.component.ts
... | ... | @@ -56,6 +56,11 @@ export class SidebarComponent implements OnInit { |
56 | 56 | aumentarCantidad(producto: Producto) { |
57 | 57 | |
58 | 58 | if (producto.cantidad < this.cantMax) { |
59 | + if (producto.PRO) { | |
60 | + producto.productos.forEach(promoProducto => { | |
61 | + promoProducto.cantidad++; | |
62 | + }) | |
63 | + } | |
59 | 64 | producto.cantidad++; |
60 | 65 | this.cantTotal++ |
61 | 66 | } |
... | ... | @@ -64,6 +69,11 @@ export class SidebarComponent implements OnInit { |
64 | 69 | restarCantidad(producto: Producto) { |
65 | 70 | |
66 | 71 | if (producto.cantidad > this.cantMin) { |
72 | + if (producto.PRO) { | |
73 | + producto.productos.forEach(promoProducto => { | |
74 | + promoProducto.cantidad--; | |
75 | + }) | |
76 | + } | |
67 | 77 | producto.cantidad--; |
68 | 78 | this.cantTotal--; |
69 | 79 | } |