From a5ce8e802122de92238fc91294d0f51c0c53c421 Mon Sep 17 00:00:00 2001 From: mpuebla Date: Thu, 22 Aug 2019 12:03:54 -0300 Subject: [PATCH] Arreglo en imagen. --- src/app/components/inicio/inicio.component.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/components/inicio/inicio.component.ts b/src/app/components/inicio/inicio.component.ts index 39364c1..96b0865 100644 --- a/src/app/components/inicio/inicio.component.ts +++ b/src/app/components/inicio/inicio.component.ts @@ -123,11 +123,17 @@ export class InicioComponent implements OnInit { promoSeleccionada($event: Producto) { - this.promoAcargar = $event; - if (this.promoAcargar.tieneSinonimos) { - var sector = this.promoAcargar.CodSec; - var codigo = this.promoAcargar.CodArt; - this.getSinonimos(sector, codigo); + if ($event.tieneSinonimos) { + + this.productoService.getProductoById($event.id) + .subscribe((res : Producto) => { + + $event.imagenes = res.imagenes; + this.promoAcargar = $event; + this.getSinonimos(this.promoAcargar.CodSec, this.promoAcargar.CodArt); + }, + error => { console.log(error); }) + } else if (this.popoverDirective) { this.popoverDirective.hide(); -- 1.9.1