Files
myprojplanet_vite/src/views/ecommerce/catalogo/catalogo.ts

1159 lines
43 KiB
TypeScript
Raw Normal View History

2024-10-26 17:12:05 +02:00
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount, PropType, nextTick } from 'vue'
2024-01-30 14:00:48 +01:00
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { CProductCard } from '@src/components/CProductCard'
import { CMySelect } from '@src/components/CMySelect'
import { CContainerCatalogoCard } from '@src/components/CContainerCatalogoCard'
2024-01-30 14:00:48 +01:00
import { CSelectUserActive } from '@src/components/CSelectUserActive'
import { IOptCatalogo, IDimensioni, IFilterCatalogo, IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg, IMyPage } from 'model'
import { fieldsTable } from '@store/Modules/fieldsTable'
2025-02-05 12:13:36 +01:00
import { useCatalogStore } from '@src/store/CatalogStore'
2024-01-30 14:00:48 +01:00
export default defineComponent({
name: 'Catalogo',
components: { CContainerCatalogoCard, CProductCard, CSelectUserActive, CMySelect },
emits: ['update:modelValue', 'updateCatalogo'],
props: {
modelValue: {
type: Object as PropType<IOptCatalogo>,
required: true,
},
idPage: {
type: String,
required: false,
default: '',
},
},
setup(props, { emit }) {
2024-01-30 14:00:48 +01:00
const userStore = useUserStore()
const globalStore = useGlobalStore()
const productStore = useProducts()
const router = useRouter()
const $q = useQuasar()
const { t } = useI18n()
const search = ref('')
const optauthors = ref(<any>[])
2024-05-08 16:07:42 +02:00
const pdfContent = ref(null);
const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue });
function updateCatalogoPadre() {
console.log('catalogo.ts PADRE')
emit('update:modelValue', optcatalogo.value);
//emit('updateCatalogo', optcatalogo.value);
}
// Metodo per aggiornare optcatalogo
const updateOptCatalogo = <K extends keyof IOptCatalogo>(key: K, value: IOptCatalogo[K]) => {
optcatalogo.value[key] = value;
updateCatalogoPadre()
}
// Utile anche per sincronizzare con le modifiche ricevute da props
watch(() => props.modelValue, (newVal) => {
optcatalogo.value = { ...newVal };
}, { deep: true });
/*watch(optcatalogo, (newValue) => {
emit('update:modelValue', newValue);
}, { deep: true });*/
2024-10-31 23:23:06 +01:00
const filter = ref(<IFilterCatalogo>{
2024-05-04 14:49:09 +02:00
author: '',
publisher: '',
type: '',
ageGroup: ''
})
2024-01-30 14:00:48 +01:00
const cosa = ref(0)
const cat = ref('')
2024-05-04 14:49:09 +02:00
const idGasSel = ref('')
2024-01-30 14:00:48 +01:00
const loadpage = ref(false)
const refreshpage = ref(false)
2024-05-04 14:49:09 +02:00
const show_hide = ref(false)
2024-01-30 14:00:48 +01:00
const mycolumns = ref([])
const catalogStore = useCatalogStore()
const tabvisu = ref('categorie')
2024-10-26 17:12:05 +02:00
const tabcatalogo = ref('visu')
const searchList = ref([] as ISearchList[])
2024-10-31 23:23:06 +01:00
const arrProducts = ref<IProduct[]>([])
const arrProdToView = ref<IProdView[]>([])
2024-01-30 14:00:48 +01:00
2024-05-04 14:49:09 +02:00
const numRecLoaded = ref(0)
2024-01-30 14:00:48 +01:00
// Create a ref for the component to fix
const componentToFixRef = ref(<any>null);
const isFixed = ref(false);
const labelcombo = computed(() => (item: any) => {
let lab = item.label
if (item.showcount)
lab += ' (' + valoriopt.value(item, false, false).length + ')'
return lab
})
2024-05-04 14:49:09 +02:00
const arrLoaded = computed(() => {
if (arrProducts.value && numRecLoaded.value)
return arrProducts.value.slice(0, numRecLoaded.value)
else {
return []
}
})
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)
})
2024-01-30 14:00:48 +01:00
// Register the scroll event on component mount
const handleScroll = () => {
const scrollTop = window.scrollY || document.documentElement.scrollTop;
// Set a threshold value based on how much scroll is needed to fix the components
const threshold = 300;
// Update the isFixed ref based on the scroll position
isFixed.value = scrollTop > threshold;
};
watch(() => cat.value, (newval, oldval) => {
if (loadpage.value)
tools.setCookie(tools.COOK_CATEGORIA, cat.value.toString())
filter.value.author = '' // disattivo il filtro autore
resetSearch()
2024-01-30 14:00:48 +01:00
calcArrProducts()
})
2024-05-04 14:49:09 +02:00
watch(() => idGasSel.value, (newval, oldval) => {
calcArrProducts()
})
watch(() => getSearchText(), (newval, oldval) => {
2024-01-30 14:00:48 +01:00
calcArrProducts()
if (tools.scrollTop() > 300) {
tools.scrollToTopValue(300)
}
})
watch(() => filter.value.author, (newval, oldval) => {
// Se filtroAuthor attivato, allora evito il filtro per Categoria
if (filter.value.author) {
cat.value = '' // disattivo il filtro categoria
if (loadpage.value)
tools.setCookie(tools.COOK_CATEGORIA, '')
resetSearch()
}
calcArrProducts()
if (tools.scrollTop() > 300) {
tools.scrollToTopValue(300)
}
})
2024-01-30 14:00:48 +01:00
watch(() => filter.value.sort_field, (newval, oldval) => {
calcArrProducts()
if (tools.scrollTop() > 300) {
tools.scrollToTopValue(300)
}
})
watch(() => filter.value.sort_dir, (newval, oldval) => {
calcArrProducts()
if (tools.scrollTop() > 300) {
tools.scrollToTopValue(300)
}
})
2024-01-30 14:00:48 +01:00
watch(() => cosa.value, (newval, oldval) => {
if (oldval !== 0) {
tools.setCookie(tools.COOK_COSA_PRODOTTI, cosa.value.toString())
if (cosa.value !== shared_consts.PROD.TUTTI) {
cat.value = ''
if (loadpage.value)
tools.setCookie(tools.COOK_CATEGORIA, '')
}
calcArrProducts()
}
2024-01-30 14:00:48 +01:00
})
watch(() => optcatalogo.value.aggiorna, (newval, oldval) => {
console.log('Aggiorna array...')
generatearrProdToViewSorted()
})
function resetSearch() {
const mialista = getSearchList()
if (mialista && mialista.value && mialista.value.hasOwnProperty('name')) {
mialista.value = null
}
search.value = ''
}
function getSearchList() {
const mylist = searchList.value.find((rec: any) => rec.table === 'products' && rec.key === 'titolo')
return mylist
}
function getSearchText(): string {
const lista = getSearchList()
return lista && lista.value && lista.value.hasOwnProperty('name') ? lista.value.name : ''
}
function getImgIntroCatalogo(scheda: IMyScheda): IImg {
let trovatocatalogo = getCatalogoByMyPage.value
2025-02-05 12:13:36 +01:00
let imagefile = ''
let fit = ''
2025-02-05 12:13:36 +01:00
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'
}
2025-02-05 12:13:36 +01:00
// 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!
}
2025-02-05 12:13:36 +01:00
return { imagefile, fit }
}
function getIdCollaneDaFiltrare(def_idCollane?: number[]) {
let idCollane: number[] = []
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
let trovatocatalogo = getCatalogoByMyPage.value
if (trovatocatalogo) {
idCollane = trovatocatalogo.idCollane! || []
2025-02-05 12:13:36 +01:00
} else {
idCollane = def_idCollane || []
2025-02-05 12:13:36 +01:00
}
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
}
2024-01-30 14:00:48 +01:00
function calcArrProducts() {
// console.log('calcArrProducts')
let arrargomstr: any = []
2024-05-04 14:49:09 +02:00
2024-10-31 23:23:06 +01:00
// eventuali titoli specifici estratti dall'array di Prodotti Selezionati
//const searchtext = getSearchText()
const searchtext = getSearchText()
let arrprod = productStore.getProducts(cosa.value) || [];
let filtroAuthor = filter.value.author || '';
//++AddCATALOGO_FIELDS
let filtroProductTypes = optcatalogo.value.productTypes || [0]
let filtroExcludeProductTypes = optcatalogo.value.excludeproductTypes || [0]
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
let editore = getEditoreDaFiltrare(optcatalogo.value.editore)
let filtroPublishers = editore || []
2025-02-05 12:13:36 +01:00
let idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane!)
let filtroCollane = idCollane || []
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
2025-02-05 12:13:36 +01:00
let boolfiltroVuotoCollane = (filtroCollane.length === 0)
//console.log('filtroVersione', filtroProductTypes)
let catstr = ''
if (optcatalogo.value.argomenti) {
// ha la priorità questo scelto sul catalogo
arrargomstr = optcatalogo.value.argomenti
} else {
catstr = cat.value || ''
}
2024-05-04 14:49:09 +02:00
let gasselstr = ''
if (cosa.value === shared_consts.PROD.GAS) {
gasselstr = idGasSel.value || '';
2024-05-04 14:49:09 +02:00
}
let lowerSearchText = (searchtext || '').toLowerCase().trim();
lowerSearchText = lowerSearchText.replace(/[-@:=]/g, '');
2025-02-05 12:13:36 +01:00
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && boolfiltroVuotoCollane && boolfiltroVuotoEditore && boolfiltroVuotoCollana && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
2024-01-30 14:00:48 +01:00
} else {
arrprod = arrprod.filter((product: IProduct) => {
2024-05-04 14:49:09 +02:00
if (product && product.productInfo) {
let lowerName = (product.productInfo.name || '').toLowerCase();
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
let hasArgomentiCat = true
if (arrargomstr && arrargomstr.length > 0) {
hasArgomentiCat = (product.productInfo.idCatProds || []).some(idCat => arrargomstr.includes(idCat))
hasCategoria = true
}
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
2024-05-04 14:49:09 +02:00
let hasProductTypes = true
let hasPublished = true
2025-02-05 12:13:36 +01:00
let hasCollana = true
let hasExcludeProductTypes = false
//++AddCATALOGO_FIELDS
if (optcatalogo.value && !boolfiltroVuotoProductTypes) {
// check if productInfo.productTypes array includes some item in optcatalogo.value.ProductTypes array
hasProductTypes = !optcatalogo.value.productTypes || (optcatalogo.value.productTypes && (product.productInfo.productTypes || []).some((item: any) => optcatalogo.value.productTypes!.includes(item)))
}
if (optcatalogo.value && !boolfiltroVuotoEditore) {
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher!))
}
2025-02-05 12:13:36 +01:00
if (optcatalogo.value && !boolfiltroVuotoCollane) {
hasCollana = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana!))
2025-02-05 12:13:36 +01:00
}
if (optcatalogo.value && !boolfiltroVuotoExcludeProductTypes) {
// check if productInfo.productTypes array exclude some item in optcatalogo.value.ProductTypes array
hasExcludeProductTypes = !optcatalogo.value.excludeproductTypes || (optcatalogo.value.excludeproductTypes && (product.productInfo.productTypes || []).every((item: any) => optcatalogo.value.excludeproductTypes!.includes(item)))
}
2024-05-04 14:49:09 +02:00
let productgassel = true
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
productgassel = (product.idGasordine === gasselstr)
}
2024-01-30 14:00:48 +01:00
2024-05-04 14:49:09 +02:00
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
// let nameMatch = new RegExp(`\\b(?=.*\\b${lowerSearchText.split(/\s+/).map(word => `(${word})\\b`).join('.*\\b')}\\b)`, 'i');
2024-01-30 14:00:48 +01:00
2024-05-08 16:07:42 +02:00
// Check if all words in lowerSearchText are present in lowerName
let allWordsPresent = lowerSearchText.split(/\s+/).every(word => new RegExp(`\\b${word}\\b`, 'i').test(lowerName));
2024-01-30 14:00:48 +01:00
2025-02-05 12:13:36 +01:00
return (codeMatch.test(product.productInfo.code || '') || allWordsPresent) && hasCategoria && hasCollana && hasArgomentiCat && hasAuthor && productgassel && hasProductTypes && hasPublished && !hasExcludeProductTypes;
} else {
console.error('product or product.productInfo is null');
return false;
2024-05-04 14:49:09 +02:00
}
2024-01-30 14:00:48 +01:00
});
}
arrprod = getProductsSorted(arrprod, filter.value.sort_field, filter.value.sort_dir);
2024-01-30 14:00:48 +01:00
arrProducts.value = arrprod
2024-10-31 23:23:06 +01:00
2024-11-28 16:04:48 +01:00
populateDataWithlinkIdTemplate()
2024-10-31 23:23:06 +01:00
generatearrProdToViewSorted()
2024-05-04 14:49:09 +02:00
loaddata()
2024-10-31 23:23:06 +01:00
2024-01-30 14:00:48 +01:00
refreshpage.value = false
}
2024-11-28 16:04:48 +01:00
function sovrascriviSchedaFromTemplate(idTemplate: string, origScheda: ISchedaSingola) {
if (!optcatalogo.value)
2024-11-28 16:04:48 +01:00
return
const arrschede: ISchedaSingola[] = globalStore.getMySchede()
const myfindscheda = arrschede.find((recscheda: ISchedaSingola) => recscheda.scheda?._id === idTemplate)
let mynewscheda = tools.jsonCopy(origScheda)
const linkIdTemplate = origScheda.scheda?.linkIdTemplate
const precname = origScheda.scheda?.name
if (myfindscheda) {
let myschedatocopy = tools.jsonCopy(myfindscheda)
if (myschedatocopy) {
myschedatocopy.scheda._id = origScheda.scheda?._id
myschedatocopy.scheda.isTemplate = false
myschedatocopy.scheda.isPagIntro = false
2024-11-28 16:04:48 +01:00
myschedatocopy.scheda.name = precname
myschedatocopy.scheda.linkIdTemplate = linkIdTemplate
return myschedatocopy.scheda
}
}
return null
}
function populateDataWithlinkIdTemplate() {
console.log('populateDataWithlinkIdTemplate')
2024-11-28 16:04:48 +01:00
if (optcatalogo.value) {
2024-11-28 16:04:48 +01:00
for (const recscheda of optcatalogo.value.arrSchede!) {
2024-11-28 16:04:48 +01:00
if (recscheda.scheda?.linkIdTemplate) {
// ricopia da Template:
const myscheda = sovrascriviSchedaFromTemplate(recscheda.scheda?.linkIdTemplate, recscheda)
if (myscheda) {
recscheda.scheda = myscheda
}
}
}
}
}
function getProductsFilteredByScheda(scheda: IMyScheda): IProduct[] {
2024-10-31 23:23:06 +01:00
const searchtext = scheda.arrProdottiSpeciali
let arrargomstr: any = []
2024-10-31 23:23:06 +01:00
let arrprod = productStore.getProducts(cosa.value) || [];
let filtroAuthor = filter.value.author || '';
let filtroProductTypes = scheda.productTypes || [0]
let filtroExcludeProductTypes = scheda.excludeproductTypes || [0]
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
let editore = getEditoreDaFiltrare(scheda.editore)
let filtroPublishers = editore || []
let idCollane = getIdCollaneDaFiltrare(scheda.idCollane)
let filtroCollane = idCollane || []
2024-10-31 23:23:06 +01:00
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
2025-02-05 12:13:36 +01:00
let boolfiltroVuotoCollane = (filtroCollane.length === 0)
2024-10-31 23:23:06 +01:00
//console.log('filtroVersione', filtroProductTypes)
let catstr = ''
if (optcatalogo.value.argomenti) {
// ha la priorità questo scelto sul catalogo
arrargomstr = optcatalogo.value.argomenti
} else {
catstr = cat.value || ''
}
2024-10-31 23:23:06 +01:00
let gasselstr = ''
if (cosa.value === shared_consts.PROD.GAS) {
gasselstr = idGasSel.value || '';
}
let lowerSearchTexts = (searchtext || []).map((text: string) =>
text.toLowerCase().trim().replace(/[-@:=]/g, '')
)
// Remove the condition that skips filtering if search text is too short
// Now it will work with multiple search terms
arrprod = arrprod.filter((product: IProduct) => {
if (product && product.productInfo) {
let lowerName = (product.productInfo.name || '').toLowerCase();
let lowerCode = (product.productInfo.code || '').toLowerCase();
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
let hasArgomentiCat = true
if (arrargomstr && arrargomstr.length > 0) {
hasArgomentiCat = (product.productInfo.idCatProds || []).some(idCat => arrargomstr.includes(idCat))
hasCategoria = true
}
2024-10-31 23:23:06 +01:00
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
// Check if ANY search term matches the product name or code
let searchMatch = lowerSearchTexts.length === 0 || lowerSearchTexts.some((searchTerm: any) => {
// Check if the entire search term is a whole word in name or code
let codeMatch = new RegExp(`\\b${searchTerm}\\b`, 'i').test(lowerCode);
// Check if all words in the search term are present in the name
let allWordsPresent = searchTerm.split(/\s+/).every((word: string) =>
new RegExp(`\\b${word}\\b`, 'i').test(lowerName)
);
return codeMatch || allWordsPresent;
});
let hasProductTypes = true
let hasPublished = true
2025-02-05 12:13:36 +01:00
let hasCollane = true
2024-10-31 23:23:06 +01:00
let hasExcludeProductTypes = false
if (!boolfiltroVuotoProductTypes) {
// check if productInfo.productTypes array includes some item in scheda.ProductTypes array
2024-11-28 16:04:48 +01:00
hasProductTypes = !scheda.productTypes || (scheda.productTypes && (product.productInfo.productTypes || []).some((item: any) => scheda.productTypes!.includes(item)))
2024-10-31 23:23:06 +01:00
}
if (!boolfiltroVuotoEditore) {
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher!))
2024-10-31 23:23:06 +01:00
}
2025-02-05 12:13:36 +01:00
if (optcatalogo.value && !boolfiltroVuotoCollane) {
hasCollane = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana!))
2025-02-05 12:13:36 +01:00
}
2024-10-31 23:23:06 +01:00
if (!boolfiltroVuotoExcludeProductTypes) {
// check if productInfo.productTypes array exclude some item in scheda.ProductTypes array
2024-11-28 16:04:48 +01:00
hasExcludeProductTypes = !scheda.excludeproductTypes || (scheda.excludeproductTypes && (product.productInfo.productTypes || []).every((item: any) => scheda.excludeproductTypes!.includes(item)))
2024-10-31 23:23:06 +01:00
}
2025-02-05 12:13:36 +01:00
return searchMatch && hasCategoria && hasArgomentiCat && hasAuthor && hasProductTypes && hasPublished && hasCollane && !hasExcludeProductTypes;
2024-10-31 23:23:06 +01:00
} else {
console.error('product or product.productInfo is null');
return false;
}
})
arrprod = getProductsSorted(arrprod, scheda?.sort_field!, scheda?.sort_dir!);
2024-11-28 16:04:48 +01:00
return arrprod
}
function getProductsSorted(arrprod: IProduct[], sort_field: string, sort_dir: number): IProduct[] {
if (sort_field) {
// Crea una copia dell'array per non modificare l'originale
const sortedArr = [...arrprod].sort((a: IProduct, b: IProduct) => {
const valA = a.productInfo?.[sort_field];
const valB = b.productInfo?.[sort_field];
2024-11-28 16:04:48 +01:00
if (valA === undefined || valB === undefined) {
return 0; // Gestisce il caso in cui il campo non esiste
}
2024-11-28 16:04:48 +01:00
if (typeof valA === 'number' && typeof valB === 'number') {
return sort_dir === 1 ? valA - valB : valB - valA;
} else {
// Per stringhe o altri tipi
const compA = valA.toString().toLowerCase();
const compB = valB.toString().toLowerCase();
return sort_dir === 1
? compA.localeCompare(compB)
: compB.localeCompare(compA);
}
});
2024-10-31 23:23:06 +01:00
return sortedArr.map((product, index) => ({
...product,
indiceRanking: index + 1
}));
2024-10-31 23:23:06 +01:00
}
return arrprod;
2024-10-31 23:23:06 +01:00
}
function addNextProductToTheView(arrproductfiltrati: IProduct[], indprod: number) {
try {
let rectrovato = null;
while (true) {
if (indprod >= arrproductfiltrati.length) {
return { end: true }
}
rectrovato = arrProdToView.value.find(
(prodview: IProdView) => prodview.id === arrproductfiltrati[indprod]._id
);
if (rectrovato) {
indprod++
continue; // Era stato già aggiunto, quindi prova col prossimo
} else {
// Non è stato ancora aggiunto, quindi prendo questo e lo aggiungo alla lista !
const myrec = arrproductfiltrati[indprod]
arrProdToView.value.push({ id: myrec._id, showed: false });
return { myrec, added: true, indprod }
}
}
} catch (e) {
console.error(e);
return { rec: null, indprod }; // Assicurati di gestire correttamente l'errore
}
}
2024-11-19 19:19:14 +01:00
function getProdBySchedaRigaCol(recscheda: ISchedaSingola, pagina: number, riga: number, col: number) {
2024-10-31 23:23:06 +01:00
try {
2024-11-19 19:19:14 +01:00
return recscheda.arrProdToShow![pagina][riga][col]
2024-10-31 23:23:06 +01:00
} catch (e) {
return null
}
}
function generatearrProdToViewSorted() {
// console.log('generatearrProdToViewSorted', arrProducts.value)
2024-10-31 23:23:06 +01:00
try {
2024-10-31 23:23:06 +01:00
// Svuota
arrProdToView.value = []
2024-11-28 16:04:48 +01:00
// gia filtrati
const arrGeneraleProdotti = arrProducts.value;
2024-11-28 16:04:48 +01:00
let indprod = 0
let indprodGenerale = 0
2024-10-31 23:23:06 +01:00
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
2024-11-28 16:04:48 +01:00
let arrProdFiltrati: IProduct[] = []
if (recscheda.scheda.productTypes!.length > 0) {
// Filtra i prodotti in base ai filtri impostati !
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
2024-11-28 16:04:48 +01:00
indprod = 0
} else {
if (recscheda.scheda?.sort_field!) {
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field!, recscheda.scheda.sort_dir!);
indprod = 0
} else {
indprod = indprodGenerale
arrProdFiltrati = arrGeneraleProdotti
}
2024-11-28 16:04:48 +01:00
}
let indadded = 0
recscheda.arrProdToShow = []
2024-11-28 16:04:48 +01:00
for (let pagina = 0; pagina < 60; pagina++) {
indadded = 0
if (!recscheda.arrProdToShow[pagina]) {
recscheda.arrProdToShow[pagina] = [];
}
2024-11-28 16:04:48 +01:00
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) {
2024-11-28 16:04:48 +01:00
let riga = Math.floor(indadded / schedePerCol)
let col = indadded % schedePerCol
2024-10-31 23:23:06 +01:00
if (!recscheda.arrProdToShow[pagina][riga]) {
recscheda.arrProdToShow[pagina][riga] = [];
}
2024-10-31 23:23:06 +01:00
// console.log('RANKING: ', result.myrec.indiceRanking!)
2024-10-31 23:23:06 +01:00
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
2024-10-31 23:23:06 +01:00
indadded++
// console.log('indadded', indadded)
2024-11-19 19:19:14 +01:00
}
}
2024-10-31 23:23:06 +01:00
}
2024-11-28 16:04:48 +01:00
if (recscheda.numPagineMax! > 0) {
if (pagina + 1 >= recscheda.numPagineMax!)
break; // fine pagine
}
2024-11-28 16:04:48 +01:00
}
// console.log('*** arrProdToShow', recscheda.arrProdToShow)
2024-10-31 23:23:06 +01:00
}
// console.log('Fine Generazione')
2024-10-31 23:23:06 +01:00
}
} catch (e) {
console.error('Err', e)
2024-10-31 23:23:06 +01:00
}
2024-11-28 16:04:48 +01:00
// console.log('Fine...')
2024-10-31 23:23:06 +01:00
}
function getNextProd() {
let nextRecord = arrProdToView.value.find((rec: any) => !rec.showed)
// Se un tale record esiste, impostalo su mostrato
if (nextRecord) {
nextRecord.showed = true
return arrProducts.value.find((recprod: IProduct) => recprod._id === nextRecord.id)
}
return null
}
2024-01-30 14:00:48 +01:00
/*function getProducts() {
let arrprod = productStore.getProducts(cosa.value)
if (!search.value) {
return arrprod
}
2024-01-30 14:00:48 +01:00
let lowerSearchText = search.value.toLowerCase();
let catstr = cat.value;
2024-01-30 14:00:48 +01:00
return arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
return (product.productInfo.code!.includes(search.value) || lowerName.includes(lowerSearchText)) && hasCategoria
});
}*/
async function mounted() {
// console.log('mounted Catalogo')
2024-01-30 14:00:48 +01:00
loadpage.value = false
await productStore.loadProducts()
mycolumns.value = fieldsTable.getArrColsByTable('products')
searchList.value = [
{
visible: true,
label: 'Ricerca',
table: 'products',
key: 'titolo',
type: costanti.FieldType.select_by_server,
value: '',
// addall: true,
arrvalue: [],
useinput: true,
filter: null,
tablesel: 'products',
},
]
optauthors.value = productStore.getAuthors()
//++Todo: Per ora visualizzo solo il "Negozio" e non i GAS...
cosa.value = shared_consts.PROD.BOTTEGA
cat.value = tools.getCookie(tools.COOK_CATEGORIA, '')
//cosa.value = tools.getCookie(tools.COOK_COSA_PRODOTTI, shared_consts.PROD.GAS, true)
//if (cosa.value === shared_consts.PROD.TUTTI)
2024-05-04 14:49:09 +02:00
2024-01-30 14:00:48 +01:00
// Inizializza
loadpage.value = true
window.addEventListener('scroll', handleScroll);
calcArrProducts()
2024-05-04 14:49:09 +02:00
loaddata()
}
function loaddata() {
numRecLoaded.value = 20
2024-01-30 14:00:48 +01:00
}
// Remove the event listener on component destroy
onBeforeUnmount(() => {
window.removeEventListener('scroll', handleScroll);
});
function getCatProds() {
let arrcat = productStore.getCatProds(cosa.value)
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
return riscat
}
2024-05-04 14:49:09 +02:00
function onLoadScroll(index: number, done: any) {
if (index >= 1) {
if (numRecLoaded.value < arrProducts.value.length) {
const step = 10
let mynrec = numRecLoaded.value + step
if (mynrec > arrProducts.value.length)
mynrec = arrProducts.value.length
numRecLoaded.value = mynrec
}
done()
} else {
done(true)
}
}
function filterFn(val: any, update: any, abort: any) {
update(() => {
const needle = val.toLowerCase();
optauthors.value = productStore.getAuthors().filter(v => {
const authorName = v.label.toLowerCase();
const wordsToSearch = needle.split(' ');
return wordsToSearch.every((word: any) => {
if (word.length > 1) {
return authorName.includes(word);
} else {
return authorName.split(' ').some((namePart: any) => namePart.startsWith(word));
}
});
});
});
}
function selauthor(id: string, value: string) {
filter.value.author = id
}
/*function searchval(newval: any, table: any, tablesel: any) {
console.log('REFRR searchval', newval, table, 'tablesel', tablesel)
if (newval) {
if (newval.hasOwnProperty('name')) {
search.value = newval.name
}
} else {
resetSearch()
}
}*/
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
// console.log('valoriopt', item.table)
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
})
2024-10-31 23:23:06 +01:00
const loadImage = (src: any) => {
return new Promise((resolve, reject) => {
const img = new Image()
img.onload = () => resolve(img)
img.onerror = reject
img.src = src
})
}
function groupedPages(recscheda: ISchedaSingola) {
2024-11-28 16:04:48 +01:00
return recscheda.arrProdToShow
}
function generateStyleCatalogo(optcatalogo: IOptCatalogo) {
2024-11-28 16:04:48 +01:00
return {
2024-10-31 23:23:06 +01:00
2024-11-28 16:04:48 +01:00
}
}
2024-10-26 17:12:05 +02:00
function generateStylePageScheda(optcatalogo: IOptCatalogo, scheda: IMyScheda) {
const marginTop = scheda.dimensioni?.pagina?.dimensioni?.margini?.top ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.margini?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.top) || '')
const marginBottom = scheda.dimensioni?.pagina?.dimensioni?.margini?.bottom ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.margini?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.bottom) || '')
const marginLeft = scheda.dimensioni?.pagina?.dimensioni?.margini?.left ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.margini?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.left) || '')
const marginRight = scheda.dimensioni?.pagina?.dimensioni?.margini?.right ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.margini?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.right) || '')
const paddingTop = scheda.dimensioni?.pagina?.dimensioni?.padding?.top ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.padding?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.top) || '')
const paddingBottom = scheda.dimensioni?.pagina?.dimensioni?.padding?.bottom ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.padding?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.bottom) || '')
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) || '')
2024-10-26 17:12:05 +02:00
// Esiste un immagine di sfondo specifica della singola pagina ?
let recimg = getSfondoImgCatalogo(scheda)
let backgroundImage = recimg.imagefile! ?? ''
let backgroundSize = recimg.fit
2024-10-26 17:12:05 +02:00
2024-11-28 16:04:48 +01:00
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) ?? '')
2024-11-19 19:19:14 +01:00
return {
2024-11-28 16:04:48 +01:00
marginBottom,
marginTop,
marginLeft,
marginRight,
paddingBottom,
paddingTop,
paddingLeft,
paddingRight,
backgroundImage,
backgroundSize,
'--width': width,
'--height': height,
...((width && width !== '0px') ? { width: `${width} !important` } : {}),
...((height && height !== '0px') ? { height: `${height} !important` } : {}) // Aggiungi l'altezza solo se è valorizzata
2024-11-28 16:04:48 +01:00
};
2024-11-19 19:19:14 +01:00
}
function generateStyleByPageDim(optcatalogo: IOptCatalogo, mypage: IDimensioni) {
const marginTop = mypage!.margini?.top ? tools.adjustSize(optcatalogo, mypage!.margini?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.top) || '')
const marginBottom = mypage!.margini?.bottom ? tools.adjustSize(optcatalogo, mypage!.margini?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.bottom) || '')
const marginLeft = mypage!.margini?.left ? tools.adjustSize(optcatalogo, mypage!.margini?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.left) || '')
const marginRight = mypage!.margini?.right ? tools.adjustSize(optcatalogo, mypage!.margini?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.right) || '')
2024-11-19 19:19:14 +01:00
const paddingTop = mypage!.padding?.top ? tools.adjustSize(optcatalogo, mypage!.padding?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.top) || '')
const paddingBottom = mypage!.padding?.bottom ? tools.adjustSize(optcatalogo, mypage!.padding?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.bottom) ?? '')
const paddingLeft = mypage!.padding?.left ? tools.adjustSize(optcatalogo, mypage!.padding?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.left) ?? '')
const paddingRight = mypage!.padding?.right ? tools.adjustSize(optcatalogo, mypage!.padding?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.right) ?? '')
2024-11-19 19:19:14 +01:00
// Esiste un immagine di sfondo specifica della singola pagina ?
let recimg = getSfondoImgCatalogo(null, mypage)
let fileimg = recimg.imagefile! ?? ''
let backgroundSize = recimg.fit
2024-11-19 19:19:14 +01:00
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!
2024-11-19 19:19:14 +01:00
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + fileimg})` : ''
}
2024-11-19 19:19:14 +01:00
let backgroundImage = fileimg ?? ''
2024-11-28 16:04:48 +01:00
let width = mypage!.size?.width ? tools.adjustSize(optcatalogo, mypage!.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
let height = mypage!.size?.height ? tools.adjustSize(optcatalogo, mypage!.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
return {
2024-11-19 19:19:14 +01:00
marginBottom,
marginTop,
marginLeft,
marginRight,
paddingBottom,
paddingTop,
paddingLeft,
paddingRight,
backgroundImage,
backgroundSize,
2024-11-19 19:19:14 +01:00
'--width': width,
'--height': height,
...((width && width !== '0px') ? { width: `${width} !important` } : {}),
...((height && height !== '0px') ? { height: `${height} !important` } : {}) // Aggiungi l'altezza solo se è valorizzata
};
}
function getWidthPagina(optcatalogo: IOptCatalogo, scheda: IMyScheda) {
2024-11-28 16:04:48 +01:00
return scheda.dimensioni?.pagina?.dimensioni?.size?.width ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
2024-11-19 19:19:14 +01:00
}
function getHeightPagina(optcatalogo: IOptCatalogo, scheda: IMyScheda) {
2024-11-28 16:04:48 +01:00
return scheda.dimensioni?.pagina?.dimensioni?.size?.height ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
}
function getStyleRowSeparator(recscheda: ISchedaSingola) {
const paddingLeft = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.left) ?? '0px';
const paddingRight = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.right) ?? '0px';
return {
paddingLeft: `${paddingLeft}`,
paddingRight: `${paddingRight}`,
};
2024-11-19 19:19:14 +01:00
}
2024-11-19 19:19:14 +01:00
function getStyleRow(recscheda: ISchedaSingola) {
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 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';
const marginLeft = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.margini?.left) || '0';
const marginRight = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.margini?.right) || '0';
const paddingTop = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.padding?.top) || '0';
const paddingBottom = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.padding?.bottom) || '0';
const paddingLeft = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.padding?.left) || '0';
const paddingRight = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.padding?.right) || '0';
let out: any = {
placeContent,
flex: `0 1 ${width} !important`,
margin: `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`,
padding: `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`,
...((width && width !== '0px') ? { width: `${width} !important` } : {}),
...((height && height !== '0px') ? { height: `${height} !important` } : {})
}
/*if (width) {
out.width = `${width} !important`
}
if (height) {
out.height = `${height} !important`
}*/
return out
}
function getStyleSchedaProdotto(recscheda: ISchedaSingola) {
const placeContent = 'center';
const width = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.size?.width) ?? '100px';
const height = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.size?.height);
const marginTop = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.top) || '0px';
const marginBottom = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.bottom) || '0px';
const marginLeft = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.left) || '0px';
const marginRight = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.margini?.right) || '0px';
const paddingTop = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.top) || '0px';
const paddingBottom = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.bottom) || '0px';
const paddingLeft = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.left) || '0px';
const paddingRight = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.scheda_prodotto?.padding?.right) || '0px';
return {
2024-11-19 19:19:14 +01:00
placeContent,
alignSelf: 'flex-start',
flex: `0 1 ${width} !important`,
2024-11-19 19:19:14 +01:00
margin: `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`,
padding: `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`,
...((height && height !== '0px') ? { height: `${height} !important` } : {}) // Aggiungi l'altezza solo se è valorizzata
};
}
2024-12-02 19:38:01 +01:00
function containsProducts(page: IProduct[][]) {
return page && page.length > 0 && page[0] && page[0].length > 0
}
2024-01-30 14:00:48 +01:00
onMounted(mounted)
return {
userStore,
costanti,
tools,
toolsext,
search,
cosa,
shared_consts,
getCatProds,
cat,
2024-05-04 14:49:09 +02:00
idGasSel,
2024-01-30 14:00:48 +01:00
productStore,
t,
loadpage,
refreshpage,
componentToFixRef,
isFixed,
arrProducts,
2024-05-04 14:49:09 +02:00
show_hide,
onLoadScroll,
numRecLoaded,
arrLoaded,
filter,
optauthors,
filterFn,
selauthor,
searchList,
fieldsTable,
valoriopt,
labelcombo,
mycolumns,
tabvisu,
getSearchText,
pdfContent,
2024-10-26 17:12:05 +02:00
tabcatalogo,
groupedPages,
2024-10-31 23:23:06 +01:00
getNextProd,
getProdBySchedaRigaCol,
generateStylePageScheda,
generateStyleCatalogo,
2024-11-19 19:19:14 +01:00
getStyleRow,
getStyleSchedaProdotto,
2024-11-19 19:19:14 +01:00
getWidthPagina,
getHeightPagina,
getStyleRowSeparator,
2024-11-28 16:04:48 +01:00
generateStyleByPageDim,
2024-12-02 19:38:01 +01:00
containsProducts,
updateOptCatalogo,
optcatalogo,
getTestoIntroduttivo,
2024-01-30 14:00:48 +01:00
}
}
})