ver: 1.1.21:
- Lista dei Cataloghi - Gestione Cataloghi in base alla configurazione
This commit is contained in:
@@ -14,7 +14,7 @@ import { CProductCard } from '@src/components/CProductCard'
|
||||
import { CMySelect } from '@src/components/CMySelect'
|
||||
import { CContainerCatalogoCard } from '@src/components/CContainerCatalogoCard'
|
||||
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
||||
import { IOptCatalogo, IDimensioni, IFilterCatalogo, IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog } from 'model'
|
||||
import { IOptCatalogo, IDimensioni, IFilterCatalogo, IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg, IMyPage } from 'model'
|
||||
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -29,6 +29,11 @@ export default defineComponent({
|
||||
type: Object as PropType<IOptCatalogo>,
|
||||
required: true,
|
||||
},
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const userStore = useUserStore()
|
||||
@@ -81,6 +86,8 @@ export default defineComponent({
|
||||
|
||||
const mycolumns = ref([])
|
||||
|
||||
const catalogStore = useCatalogStore()
|
||||
|
||||
const tabvisu = ref('categorie')
|
||||
const tabcatalogo = ref('visu')
|
||||
|
||||
@@ -111,6 +118,33 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
const getTestoIntroduttivo = computed(() => (recscheda: ISchedaSingola) => {
|
||||
|
||||
let testo = recscheda.scheda!.dimensioni.pagina?.testo_up?.contenuto
|
||||
|
||||
if (recscheda.scheda!.isPagIntro) {
|
||||
|
||||
const catalogStore = useCatalogStore()
|
||||
const catalog = catalogStore.catalogs?.find((catalog: ICatalog) => catalog.idPageAssigned === props.idPage)
|
||||
if (catalog && catalog.descr_introduttiva) {
|
||||
// Cerca se la descrizione introduttiva è stata impostata
|
||||
testo = catalog.descr_introduttiva
|
||||
let clcol = ''
|
||||
if (catalog.pagina_introduttiva_sfondo_nero) {
|
||||
clcol = `text-white`
|
||||
}
|
||||
testo = `<span class="book-text-up ${clcol}">` + testo + `</span>`
|
||||
}
|
||||
}
|
||||
|
||||
return testo
|
||||
|
||||
})
|
||||
|
||||
const getCatalogoByMyPage = computed(() => {
|
||||
return catalogStore.catalogs?.find((catalog: ICatalog) => catalog.idPageAssigned === props.idPage)
|
||||
})
|
||||
|
||||
// Register the scroll event on component mount
|
||||
const handleScroll = () => {
|
||||
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
||||
@@ -209,23 +243,91 @@ export default defineComponent({
|
||||
return lista && lista.value && lista.value.hasOwnProperty('name') ? lista.value.name : ''
|
||||
}
|
||||
|
||||
function getIdCollaneDaFiltrare() {
|
||||
function getImgIntroCatalogo(scheda: IMyScheda): IImg {
|
||||
let trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
let imagefile = ''
|
||||
let fit = ''
|
||||
|
||||
if (trovatocatalogo && scheda.isPagIntro) {
|
||||
const recimg = trovatocatalogo.img_intro
|
||||
if (recimg) {
|
||||
imagefile = recimg.imagefile!
|
||||
fit = recimg.fit! || 'contain'
|
||||
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + shared_consts.getDirectoryByTable(shared_consts.TABLES_CATALOG) + '/' + trovatocatalogo._id + '/' + imagefile})` : ''
|
||||
}
|
||||
}
|
||||
|
||||
return { imagefile, fit }
|
||||
}
|
||||
|
||||
function getSfondoImgCatalogo(scheda?: IMyScheda | null, mypage?: IDimensioni): IImg {
|
||||
let trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
let imagefile = ''
|
||||
let fit = ''
|
||||
|
||||
if (trovatocatalogo) {
|
||||
// Cerca prima se c'è un Immagine Introduttiva
|
||||
const recimgintro = getImgIntroCatalogo(scheda!)
|
||||
if (recimgintro.imagefile) {
|
||||
imagefile = recimgintro.imagefile!
|
||||
fit = recimgintro.fit! || 'contain'
|
||||
}
|
||||
|
||||
// Poi cerca se c'è l'immagine di sfondo
|
||||
const recimg = trovatocatalogo.img_bordata!
|
||||
if (!imagefile && recimg) {
|
||||
imagefile = recimg.imagefile!
|
||||
fit = recimg.fit! || 'contain'
|
||||
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + shared_consts.getDirectoryByTable(shared_consts.TABLES_CATALOG) + '/' + trovatocatalogo._id + '/' + imagefile})` : ''
|
||||
}
|
||||
}
|
||||
|
||||
if (!imagefile && scheda) {
|
||||
imagefile = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo!.imagefile!
|
||||
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + costanti.DIR_SCHEDA + imagefile})` : ''
|
||||
fit = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo!.fit!
|
||||
}
|
||||
if (!imagefile && mypage) {
|
||||
imagefile = mypage.imgsfondo!.imagefile!
|
||||
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + imagefile})` : ''
|
||||
fit = mypage.imgsfondo!.fit!
|
||||
}
|
||||
|
||||
return { imagefile, fit }
|
||||
}
|
||||
|
||||
function getIdCollaneDaFiltrare(def_idCollane?: number[]) {
|
||||
let idCollane: number[] = []
|
||||
|
||||
const catalogStore = useCatalogStore()
|
||||
|
||||
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
|
||||
let trovato = catalogStore.catalogs?.find((catalog: ICatalog) => catalog.idPageAssigned)
|
||||
|
||||
if (trovato) {
|
||||
let trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
if (trovatocatalogo) {
|
||||
idCollane = trovatocatalogo.idCollane! || []
|
||||
} else {
|
||||
idCollane = optcatalogo.value.idCollane! || []
|
||||
idCollane = def_idCollane || []
|
||||
}
|
||||
|
||||
return idCollane
|
||||
}
|
||||
|
||||
function getEditoreDaFiltrare(def_editori?: string[]) {
|
||||
let editore: string[] = []
|
||||
|
||||
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
|
||||
let trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
if (trovatocatalogo) {
|
||||
editore = trovatocatalogo.editore! || []
|
||||
} else {
|
||||
editore = def_editori || []
|
||||
}
|
||||
|
||||
return editore
|
||||
}
|
||||
|
||||
function calcArrProducts() {
|
||||
// console.log('calcArrProducts')
|
||||
|
||||
@@ -245,9 +347,11 @@ export default defineComponent({
|
||||
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
|
||||
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
|
||||
|
||||
let filtroPublishers = optcatalogo.value.editore || []
|
||||
let editore = getEditoreDaFiltrare(optcatalogo.value.editore)
|
||||
let filtroPublishers = editore || []
|
||||
|
||||
let filtroCollane = getIdCollaneDaFiltrare()
|
||||
let idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane!)
|
||||
let filtroCollane = idCollane || []
|
||||
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
|
||||
let boolfiltroVuotoCollane = (filtroCollane.length === 0)
|
||||
|
||||
@@ -296,10 +400,10 @@ export default defineComponent({
|
||||
hasProductTypes = !optcatalogo.value.productTypes || (optcatalogo.value.productTypes && (product.productInfo.productTypes || []).some((item: any) => optcatalogo.value.productTypes!.includes(item)))
|
||||
}
|
||||
if (optcatalogo.value && !boolfiltroVuotoEditore) {
|
||||
hasPublished = !optcatalogo.value.editore || (optcatalogo.value.editore && optcatalogo.value.editore.includes(product.productInfo.idPublisher!))
|
||||
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher!))
|
||||
}
|
||||
if (optcatalogo.value && !boolfiltroVuotoCollane) {
|
||||
hasCollana = !optcatalogo.value.idCollane || (optcatalogo.value.idCollane && optcatalogo.value.idCollane.includes(product.productInfo.idCollana!))
|
||||
hasCollana = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana!))
|
||||
}
|
||||
|
||||
if (optcatalogo.value && !boolfiltroVuotoExcludeProductTypes) {
|
||||
@@ -359,6 +463,7 @@ export default defineComponent({
|
||||
if (myschedatocopy) {
|
||||
myschedatocopy.scheda._id = origScheda.scheda?._id
|
||||
myschedatocopy.scheda.isTemplate = false
|
||||
myschedatocopy.scheda.isPagIntro = false
|
||||
myschedatocopy.scheda.name = precname
|
||||
myschedatocopy.scheda.linkIdTemplate = linkIdTemplate
|
||||
|
||||
@@ -370,6 +475,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function populateDataWithlinkIdTemplate() {
|
||||
console.log('populateDataWithlinkIdTemplate')
|
||||
|
||||
if (optcatalogo.value) {
|
||||
|
||||
@@ -402,8 +508,11 @@ export default defineComponent({
|
||||
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
|
||||
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
|
||||
|
||||
let filtroPublishers = scheda.editore || []
|
||||
let filtroCollane = getIdCollaneDaFiltrare()
|
||||
let editore = getEditoreDaFiltrare(scheda.editore)
|
||||
let filtroPublishers = editore || []
|
||||
|
||||
let idCollane = getIdCollaneDaFiltrare(scheda.idCollane)
|
||||
let filtroCollane = idCollane || []
|
||||
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
|
||||
let boolfiltroVuotoCollane = (filtroCollane.length === 0)
|
||||
|
||||
@@ -464,11 +573,11 @@ export default defineComponent({
|
||||
hasProductTypes = !scheda.productTypes || (scheda.productTypes && (product.productInfo.productTypes || []).some((item: any) => scheda.productTypes!.includes(item)))
|
||||
}
|
||||
if (!boolfiltroVuotoEditore) {
|
||||
hasPublished = !scheda.editore || (scheda.editore && scheda.editore.includes(product.productInfo.idPublisher!))
|
||||
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher!))
|
||||
}
|
||||
|
||||
if (optcatalogo.value && !boolfiltroVuotoCollane) {
|
||||
hasCollane = !optcatalogo.value.idCollane || (optcatalogo.value.idCollane && optcatalogo.value.idCollane.includes(product.productInfo.idCollana!))
|
||||
hasCollane = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana!))
|
||||
}
|
||||
|
||||
if (!boolfiltroVuotoExcludeProductTypes) {
|
||||
@@ -566,85 +675,90 @@ export default defineComponent({
|
||||
function generatearrProdToViewSorted() {
|
||||
// console.log('generatearrProdToViewSorted', arrProducts.value)
|
||||
|
||||
// Svuota
|
||||
arrProdToView.value = []
|
||||
try {
|
||||
|
||||
// gia filtrati
|
||||
const arrGeneraleProdotti = arrProducts.value;
|
||||
// Svuota
|
||||
arrProdToView.value = []
|
||||
|
||||
let indprod = 0
|
||||
let indprodGenerale = 0
|
||||
// gia filtrati
|
||||
const arrGeneraleProdotti = arrProducts.value;
|
||||
|
||||
for (const recscheda of optcatalogo.value.arrSchede!) {
|
||||
if (recscheda && recscheda.scheda) {
|
||||
let schedePerRiga = recscheda.scheda.numschede_perRiga || 1
|
||||
let schedePerCol = recscheda.scheda.numschede_perCol || 1
|
||||
let schedePerPagina = schedePerRiga * schedePerCol
|
||||
let indprod = 0
|
||||
let indprodGenerale = 0
|
||||
|
||||
let arrProdFiltrati: IProduct[] = []
|
||||
for (const recscheda of optcatalogo.value.arrSchede!) {
|
||||
if (recscheda && recscheda.scheda) {
|
||||
let schedePerRiga = recscheda.scheda.numschede_perRiga || 1
|
||||
let schedePerCol = recscheda.scheda.numschede_perCol || 1
|
||||
let schedePerPagina = schedePerRiga * schedePerCol
|
||||
|
||||
if (recscheda.scheda.productTypes!.length > 0) {
|
||||
// Filtra i prodotti in base ai filtri impostati !
|
||||
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
|
||||
indprod = 0
|
||||
} else {
|
||||
if (recscheda.scheda?.sort_field!) {
|
||||
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field!, recscheda.scheda.sort_dir!);
|
||||
let arrProdFiltrati: IProduct[] = []
|
||||
|
||||
if (recscheda.scheda.productTypes!.length > 0) {
|
||||
// Filtra i prodotti in base ai filtri impostati !
|
||||
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
|
||||
indprod = 0
|
||||
} else {
|
||||
indprod = indprodGenerale
|
||||
arrProdFiltrati = arrGeneraleProdotti
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// console.log('arrProdFiltrati indiceRanking = ', arrProdFiltrati[0].indiceRanking)
|
||||
|
||||
let indadded = 0
|
||||
recscheda.arrProdToShow = []
|
||||
|
||||
for (let pagina = 0; pagina < 100; pagina++) {
|
||||
indadded = 0
|
||||
if (!recscheda.arrProdToShow[pagina]) {
|
||||
recscheda.arrProdToShow[pagina] = [];
|
||||
}
|
||||
|
||||
for (let giro = 0; giro < schedePerPagina; giro++) {
|
||||
// Aggiunge il prossimo prodotto che non è stato ancora inserito
|
||||
const result = addNextProductToTheView(arrProdFiltrati, indprod);
|
||||
if (result.end) {
|
||||
break; // Esci dal ciclo se non ci sono più prodotti disponibili
|
||||
if (recscheda.scheda?.sort_field!) {
|
||||
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field!, recscheda.scheda.sort_dir!);
|
||||
indprod = 0
|
||||
} else {
|
||||
if (result.indprod)
|
||||
indprod = result.indprod // Aggiorna indprod per il prossimo giro
|
||||
if (result.myrec) {
|
||||
|
||||
let riga = Math.floor(indadded / schedePerCol)
|
||||
let col = indadded % schedePerCol
|
||||
|
||||
if (!recscheda.arrProdToShow[pagina][riga]) {
|
||||
recscheda.arrProdToShow[pagina][riga] = [];
|
||||
}
|
||||
|
||||
// console.log('RANKING: ', result.myrec.indiceRanking!)
|
||||
|
||||
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
|
||||
|
||||
indadded++
|
||||
}
|
||||
indprod = indprodGenerale
|
||||
arrProdFiltrati = arrGeneraleProdotti
|
||||
}
|
||||
}
|
||||
|
||||
if (recscheda.numPagineMax! > 0) {
|
||||
if (pagina + 1 >= recscheda.numPagineMax!)
|
||||
break; // fine pagine
|
||||
let indadded = 0
|
||||
recscheda.arrProdToShow = []
|
||||
|
||||
for (let pagina = 0; pagina < 60; pagina++) {
|
||||
indadded = 0
|
||||
if (!recscheda.arrProdToShow[pagina]) {
|
||||
recscheda.arrProdToShow[pagina] = [];
|
||||
}
|
||||
|
||||
for (let giro = 0; giro < schedePerPagina; giro++) {
|
||||
// Aggiunge il prossimo prodotto che non è stato ancora inserito
|
||||
const result = addNextProductToTheView(arrProdFiltrati, indprod);
|
||||
if (result.end) {
|
||||
break; // Esci dal ciclo se non ci sono più prodotti disponibili
|
||||
} else {
|
||||
if (result.indprod)
|
||||
indprod = result.indprod // Aggiorna indprod per il prossimo giro
|
||||
if (result.myrec) {
|
||||
|
||||
let riga = Math.floor(indadded / schedePerCol)
|
||||
let col = indadded % schedePerCol
|
||||
|
||||
if (!recscheda.arrProdToShow[pagina][riga]) {
|
||||
recscheda.arrProdToShow[pagina][riga] = [];
|
||||
}
|
||||
|
||||
// console.log('RANKING: ', result.myrec.indiceRanking!)
|
||||
|
||||
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
|
||||
|
||||
indadded++
|
||||
// console.log('indadded', indadded)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (recscheda.numPagineMax! > 0) {
|
||||
if (pagina + 1 >= recscheda.numPagineMax!)
|
||||
break; // fine pagine
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// console.log('*** arrProdToShow', recscheda.arrProdToShow)
|
||||
}
|
||||
|
||||
// console.log('*** arrProdToShow', recscheda.arrProdToShow)
|
||||
// console.log('Fine Generazione')
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error('Err', e)
|
||||
}
|
||||
|
||||
// console.log('Fine...')
|
||||
@@ -830,21 +944,11 @@ export default defineComponent({
|
||||
const paddingLeft = scheda.dimensioni?.pagina?.dimensioni?.padding?.left ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.padding?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.left) || '')
|
||||
const paddingRight = scheda.dimensioni?.pagina?.dimensioni?.padding?.right ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.padding?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.right) || '')
|
||||
|
||||
|
||||
// Esiste un immagine di sfondo specifica della singola pagina ?
|
||||
let fileimg = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo?.imagefile
|
||||
let backgroundSize = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo?.fit
|
||||
if (fileimg) {
|
||||
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_SCHEDA + fileimg})` : ''
|
||||
}
|
||||
|
||||
if (!fileimg) {
|
||||
// Esiste un immagine di sfondo uguali per tutte le pagine ?
|
||||
fileimg = optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
|
||||
backgroundSize = optcatalogo.dimensioni_def?.pagina.imgsfondo?.fit
|
||||
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + fileimg})` : ''
|
||||
}
|
||||
|
||||
let backgroundImage = fileimg ?? ''
|
||||
let recimg = getSfondoImgCatalogo(scheda)
|
||||
let backgroundImage = recimg.imagefile! ?? ''
|
||||
let backgroundSize = recimg.fit
|
||||
|
||||
let width = scheda.dimensioni?.pagina?.dimensioni?.size?.width ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
|
||||
let height = scheda.dimensioni?.pagina?.dimensioni?.size?.height ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
|
||||
@@ -862,8 +966,8 @@ export default defineComponent({
|
||||
backgroundSize,
|
||||
'--width': width,
|
||||
'--height': height,
|
||||
...(width ? { width: `${width} !important;` } : {}),
|
||||
...(height ? { height: `${height} !important;` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
...((width && width !== '0px') ? { width: `${width} !important` } : {}),
|
||||
...((height && height !== '0px') ? { height: `${height} !important` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
};
|
||||
}
|
||||
|
||||
@@ -879,16 +983,14 @@ export default defineComponent({
|
||||
const paddingRight = mypage!.padding?.right ? tools.adjustSize(optcatalogo, mypage!.padding?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.right) ?? '')
|
||||
|
||||
// Esiste un immagine di sfondo specifica della singola pagina ?
|
||||
let fileimg = mypage!.imgsfondo?.imagefile
|
||||
let backgroundSize = mypage!.imgsfondo?.fit
|
||||
if (fileimg) {
|
||||
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + fileimg})` : ''
|
||||
}
|
||||
let recimg = getSfondoImgCatalogo(null, mypage)
|
||||
let fileimg = recimg.imagefile! ?? ''
|
||||
let backgroundSize = recimg.fit
|
||||
|
||||
if (!fileimg) {
|
||||
// Esiste un immagine di sfondo uguali per tutte le pagine ?
|
||||
fileimg = optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
|
||||
backgroundSize = optcatalogo.dimensioni_def?.pagina.imgsfondo?.fit
|
||||
fileimg = optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile!
|
||||
backgroundSize = optcatalogo.dimensioni_def?.pagina.imgsfondo?.fit!
|
||||
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + fileimg})` : ''
|
||||
}
|
||||
|
||||
@@ -910,8 +1012,8 @@ export default defineComponent({
|
||||
backgroundSize,
|
||||
'--width': width,
|
||||
'--height': height,
|
||||
...(width ? { width: `${width} !important;` } : {}),
|
||||
...(height ? { height: `${height} !important;` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
...((width && width !== '0px') ? { width: `${width} !important` } : {}),
|
||||
...((height && height !== '0px') ? { height: `${height} !important` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
};
|
||||
}
|
||||
|
||||
@@ -936,7 +1038,7 @@ export default defineComponent({
|
||||
const placeContent = 'center';
|
||||
|
||||
const width = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.size?.width) ?? '';
|
||||
const height = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.size?.height);
|
||||
const height = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.size?.height) ?? '';
|
||||
|
||||
const marginTop = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.margini?.top) || '0';
|
||||
const marginBottom = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.margini?.bottom) || '0';
|
||||
@@ -950,17 +1052,19 @@ export default defineComponent({
|
||||
|
||||
let out: any = {
|
||||
placeContent,
|
||||
flex: `0 1 ${width} !important;`,
|
||||
flex: `0 1 ${width} !important`,
|
||||
margin: `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`,
|
||||
padding: `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`
|
||||
padding: `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`,
|
||||
...((width && width !== '0px') ? { width: `${width} !important` } : {}),
|
||||
...((height && height !== '0px') ? { height: `${height} !important` } : {})
|
||||
}
|
||||
|
||||
if (width) {
|
||||
out.width = `${width} !important;`
|
||||
/*if (width) {
|
||||
out.width = `${width} !important`
|
||||
}
|
||||
if (height) {
|
||||
out.height = `${height} !important;`
|
||||
}
|
||||
out.height = `${height} !important`
|
||||
}*/
|
||||
|
||||
return out
|
||||
|
||||
@@ -985,10 +1089,10 @@ export default defineComponent({
|
||||
return {
|
||||
placeContent,
|
||||
alignSelf: 'flex-start',
|
||||
flex: `0 1 ${width} !important;`,
|
||||
flex: `0 1 ${width} !important`,
|
||||
margin: `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`,
|
||||
padding: `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`,
|
||||
...(height ? { height: `${height} !important;` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
...((height && height !== '0px') ? { height: `${height} !important` } : {}) // Aggiungi l'altezza solo se è valorizzata
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1047,6 +1151,7 @@ export default defineComponent({
|
||||
containsProducts,
|
||||
updateOptCatalogo,
|
||||
optcatalogo,
|
||||
getTestoIntroduttivo,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user