diff --git a/src/app/components/inicio/inicio.component.ts b/src/app/components/inicio/inicio.component.ts index 3a01863..00fd0f2 100644 --- a/src/app/components/inicio/inicio.component.ts +++ b/src/app/components/inicio/inicio.component.ts @@ -65,6 +65,7 @@ export class InicioComponent implements OnInit { if (res.length === 0) { //Si no tiene promociones la cargará al carrito despues de un tiempo setTimeout(() => { + this.productoAcargar.cantidad = 1; this.productoService.productos.push(this.productoAcargar); this.productoAcargar = this.productoService.productoAcargar = undefined; }, 2000) @@ -95,7 +96,7 @@ export class InicioComponent implements OnInit { } confirmarProducto() { - + this.promoAcargar.cantidad = 1; this.productoService.productos.push(this.promoAcargar); this.promoAcargar = undefined; this.productoAcargar = undefined; @@ -112,11 +113,11 @@ export class InicioComponent implements OnInit { if (this.promoAcargar) { this.promoAcargar = undefined; - if(this.productoAcargar.PRO){ + if (this.productoAcargar.PRO) { this.productoAcargar = undefined; this.promociones = []; this.popoverDirective.hide(); - }else{ + } else { this.popoverDirective.show(); } } else {