diff --git a/src/app/components/inicio/inicio.component.html b/src/app/components/inicio/inicio.component.html index 312293f..d042471 100644 --- a/src/app/components/inicio/inicio.component.html +++ b/src/app/components/inicio/inicio.component.html @@ -65,10 +65,16 @@ + class="text-white rounded-sm border-0"> + +
- +
+
+ + + \ No newline at end of file diff --git a/src/app/components/popover-sinonimos/popover-sinonimos.component.scss b/src/app/components/popover-sinonimos/popover-sinonimos.component.scss index e69de29..8335d2b 100644 --- a/src/app/components/popover-sinonimos/popover-sinonimos.component.scss +++ b/src/app/components/popover-sinonimos/popover-sinonimos.component.scss @@ -0,0 +1,4 @@ +.popover-size { + max-height: 57vh !important; + min-height: 57vh !important; +} \ No newline at end of file diff --git a/src/app/components/popover-sinonimos/popover-sinonimos.component.ts b/src/app/components/popover-sinonimos/popover-sinonimos.component.ts index be9eced..40b291d 100644 --- a/src/app/components/popover-sinonimos/popover-sinonimos.component.ts +++ b/src/app/components/popover-sinonimos/popover-sinonimos.component.ts @@ -1,4 +1,6 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Input } from '@angular/core'; +import { PopoverDirective } from 'ngx-bootstrap'; +import { Sinonimo } from 'src/app/wrappers/sinonimo'; @Component({ selector: 'app-popover-sinonimos', @@ -7,9 +9,24 @@ import { Component, OnInit } from '@angular/core'; }) export class PopoverSinonimosComponent implements OnInit { + //Directiva del popover, para poder cerrarlo desde este componente + @Input() popover: PopoverDirective; + @Input() popoverContent: Sinonimo[]; + sinonimoAelegir: Sinonimo; + constructor() { } ngOnInit() { } + hidePopover() { + + this.popover.hide(); + } + + setSinonimo(sinonimo: Sinonimo) { + + this.sinonimoAelegir = sinonimo; + } + } diff --git a/src/app/services/producto.service.ts b/src/app/services/producto.service.ts index e5e1901..0aa9656 100644 --- a/src/app/services/producto.service.ts +++ b/src/app/services/producto.service.ts @@ -24,10 +24,18 @@ export class ProductoService { this.productos.push(producto); } + getPromocion(sector, codigo): Observable { - var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${sector}/${codigo}`; + // var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${sector}/${codigo}`; + var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${2}/${1306}`; return this.http.get(url); } + getPromocionSinonimos(sector, codigo): Observable { + + // var url = `${appSettings.apiUrl}/promociones/incluir-articulo/${sector}/${codigo}`; + var url = `${appSettings.apiUrl}/sinonimos/promo/${2}/${7}`; + return this.http.get(url); + } } diff --git a/src/app/wrappers/producto.ts b/src/app/wrappers/producto.ts index 3773971..7bddfae 100644 --- a/src/app/wrappers/producto.ts +++ b/src/app/wrappers/producto.ts @@ -88,6 +88,6 @@ export interface Producto { id: number; nombreImagen?: any; - cantidad?:number; - showCargarProducto?:boolean; + cantidad?: number; + showCargarProducto?: boolean; } diff --git a/src/app/wrappers/promocion.ts b/src/app/wrappers/promocion.ts index b357edb..b4290e4 100644 --- a/src/app/wrappers/promocion.ts +++ b/src/app/wrappers/promocion.ts @@ -4,4 +4,7 @@ export interface Promocion { idPromo: number; nombrePromo: string; productos: Producto[]; + sinonimos: boolean; + sector: number, + codigo: number, } diff --git a/src/app/wrappers/sinonimo.ts b/src/app/wrappers/sinonimo.ts new file mode 100644 index 0000000..7ec044c --- /dev/null +++ b/src/app/wrappers/sinonimo.ts @@ -0,0 +1,106 @@ +export interface Sinonimo { + EMP: number; + ID_SIN: number; + SEC: number; + COD: string; + DET: string; + E_HD: string[]; + C_HD: string[]; + CodSec: number; + CodArt: number; + DetArt: string; + CodRub: number; + Costo: number; + PreNet: number; + ImpInt: number; + UniVen: number; + FecCos: Date; + UltAct: Date; + CodPro: number; + ExiDep: number; + ExiVta: number; + MinDep: number; + MaxDep: number; + MinPVE: number; + MaxPVE: number; + ENTTur: number; + SINTur: number; + SALTur: number; + IvaSN: boolean; + DepSN: boolean; + RubMay: number; + PreVen: number; + IvaCO: number; + TIP: string; + IMPIVA: number; + ENTADM: number; + SALADM: number; + CODIIN: number; + PRO: boolean; + FPP: boolean; + ESS: boolean; + FID: Date; + NID: number; + FIV: Date; + NIV: number; + COO: string; + CAG: string; + CAP: number; + UTL: number; + NHA: boolean; + PID: boolean; + PRV: number; + PRD: number; + ImpInt2: number; + CLA: number; + UNICAP: number; + ELBPRO: string; + PPP: number; + ALI: number; + BAL_TIPO: string; + PER_MAY: boolean; + ES_MAY: boolean; + CLA_MAY: number; + PME_CMP: string; + USA_BAL: boolean; + DET_LAR: string; + ROTULO: string; + REC_MANUAL: boolean; + E_HD1: string; + C_HD1: string; + ImpInt3: number; + FUA_MAE_YPF: Date; + CPQ: number; + EPQ: string; + BPQ: number; + PUPQ: number; + CORVTO: boolean; + CORVTO_COSTO: number; + UTLFR: number; + FAMILIA: number; + ES_LUB: boolean; + ES_FERT: boolean; + AutoFac: boolean; + LitrosPCD: number; + LisPCD: number; + id: number; + ImpLey23966: boolean; + es_bio: boolean; + ExpArbaRev: boolean; + ES_AGROQ: boolean; + ES_PLAST: boolean; + es_bio_por: string; + ID_MARCA: number; + ID_ATRB1: number; + ID_ATRB2: number; + ID_ART_REF: number; + ILPC: boolean; + CantAgrupar: number; + E_HD2: string; + PPV: number; + PPD: number; + MOD_DET: boolean; + C_HD2: string; + nombreImagen?: any; + IMP_IMP_INT: boolean; +}