Commit e4a951a25e22cdc61d411b8b3897060b1f7db9d1
1 parent
619bc32e54
Exists in
master
and in
1 other branch
Agregada cantidad igual a 1 al agregar productos al carrito.
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
src/app/components/inicio/inicio.component.ts
... | ... | @@ -65,6 +65,7 @@ export class InicioComponent implements OnInit { |
65 | 65 | if (res.length === 0) { |
66 | 66 | //Si no tiene promociones la cargará al carrito despues de un tiempo |
67 | 67 | setTimeout(() => { |
68 | + this.productoAcargar.cantidad = 1; | |
68 | 69 | this.productoService.productos.push(this.productoAcargar); |
69 | 70 | this.productoAcargar = this.productoService.productoAcargar = undefined; |
70 | 71 | }, 2000) |
... | ... | @@ -95,7 +96,7 @@ export class InicioComponent implements OnInit { |
95 | 96 | } |
96 | 97 | |
97 | 98 | confirmarProducto() { |
98 | - | |
99 | + this.promoAcargar.cantidad = 1; | |
99 | 100 | this.productoService.productos.push(this.promoAcargar); |
100 | 101 | this.promoAcargar = undefined; |
101 | 102 | this.productoAcargar = undefined; |
... | ... | @@ -112,11 +113,11 @@ export class InicioComponent implements OnInit { |
112 | 113 | |
113 | 114 | if (this.promoAcargar) { |
114 | 115 | this.promoAcargar = undefined; |
115 | - if(this.productoAcargar.PRO){ | |
116 | + if (this.productoAcargar.PRO) { | |
116 | 117 | this.productoAcargar = undefined; |
117 | 118 | this.promociones = []; |
118 | 119 | this.popoverDirective.hide(); |
119 | - }else{ | |
120 | + } else { | |
120 | 121 | this.popoverDirective.show(); |
121 | 122 | } |
122 | 123 | } else { |