- corretto scheda prodotto, record salvato

This commit is contained in:
Surya Paolo
2025-05-01 00:20:02 +02:00
parent 358f0d6816
commit 721d2ac38c
32 changed files with 296 additions and 177 deletions

View File

@@ -214,6 +214,16 @@ export default defineComponent({
let testo = getTextSostituito(recscheda.scheda!.dimensioni.pagina?.testo_title)
const catalog = getCatalogoByMyPage.value
let clcol = ''
if (catalog.pagina_introduttiva_sfondo_nero) {
clcol = `text-white`
}
testo = `<span class="book-pagina-title ${clcol}">` + testo + `</span>`
return testo
})
@@ -489,6 +499,7 @@ export default defineComponent({
filtroProductTypes: number[],
filtroExcludeProductTypes: number[],
filtroidTipologie: number[],
filtroidTipoFormato: number[],
editore: string[],
idCollane: string[],
arrargomstr: any[],
@@ -507,6 +518,7 @@ export default defineComponent({
filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && filtroProductTypes[0] === 0);
const boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0;
const boolfiltroVuotoidTipologie = filtroidTipologie.length === 0;
const boolfiltroVuotoidTipoFormato = filtroidTipoFormato.length === 0;
const boolfiltroVuotoEditore = editore.length === 0;
const boolfiltroVuotoCollane = idCollane.length === 0;
const boolfiltroVuotoArgomenti = arrargomstr.length === 0;
@@ -587,6 +599,10 @@ export default defineComponent({
? true
: filtroidTipologie.includes(product.arrvariazioni?.[0].idTipologia);
const hasidTipoFormato = boolfiltroVuotoidTipoFormato
? true
: filtroidTipoFormato.includes(product.arrvariazioni?.[0].idTipoFormato);
// Filtri per editore
const hasPublished = boolfiltroVuotoEditore
? se_tutti_veri
@@ -615,7 +631,7 @@ export default defineComponent({
const filtri = [hasArgomentiCat, hasCategoria, hasCollana, hasPublished];
// Decido se combinare in AND o OR sulla base della scelta globale
let risult = searchMatch && hasAuthor && productgassel && hasidTipologie
let risult = searchMatch && hasAuthor && productgassel && hasidTipologie && hasidTipoFormato
if (op_andor.condition_andor === costanti.OP_ANDOR.OP_AND) {
risult = risult && filtri.every(Boolean); // Tutti i gruppi devono essere veri
@@ -653,6 +669,7 @@ export default defineComponent({
const filtroProductTypes = optcatalogo.value.productTypes || [0];
const filtroExcludeProductTypes = optcatalogo.value.excludeproductTypes || [0];
const filtroidTipologie = optcatalogo.value.idTipologie || [];
const filtroidTipoFormato = optcatalogo.value.idTipoFormato || [];
const editore = getEditoreDaFiltrare(optcatalogo.value.editore);
const filtroPublishers = editore || [];
const idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane);
@@ -693,6 +710,7 @@ export default defineComponent({
filtroProductTypes,
filtroExcludeProductTypes,
filtroidTipologie,
filtroidTipoFormato,
filtroPublishers,
filtroCollane,
arrargomstr,
@@ -752,6 +770,7 @@ export default defineComponent({
!arraysEqual(scheda.productTypes, schedaprec?.productTypes) ||
!arraysEqual(scheda.excludeproductTypes, schedaprec?.excludeproductTypes) ||
!arraysEqual(scheda.idTipologie, schedaprec?.idTipologie) ||
!arraysEqual(scheda.idTipoFormato, schedaprec?.idTipoFormato) ||
!arraysEqual(scheda.editore, schedaprec?.editore) ||
!arraysEqual(scheda.idCollane, schedaprec?.idCollane)
;
@@ -767,6 +786,7 @@ export default defineComponent({
const filtroProductTypes = scheda.productTypes || [0];
const filtroExcludeProductTypes = scheda.excludeproductTypes || [0];
const filtroidTipologie = scheda.idTipologie || [];
const filtroidTipoFormato = scheda.idTipoFormato || [];
const editore = getEditoreDaFiltrare(scheda.editore);
const filtroPublishers = editore || [];
const idCollane = getIdCollaneDaFiltrare(scheda.idCollane);
@@ -795,6 +815,7 @@ export default defineComponent({
filtroProductTypes,
filtroExcludeProductTypes,
filtroidTipologie,
filtroidTipoFormato,
filtroPublishers,
filtroCollane,
arrargomstr,
@@ -1091,7 +1112,11 @@ export default defineComponent({
if (showListaArgomenti.value)
cat.value = tools.getCookie(getKeyCatAtLoad(), '')
tabcatalogo.value = tools.getCookie('TAB_CAT', 'visu')
if (getCatalogoByMyPage.value) {
tabcatalogo.value = tools.getCookie('TAB_CAT', 'visu')
} else {
tabcatalogo.value = 'visu'
}
optrigenera.value.visibilitaDisp = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_DISP', costanti.DISP.DISPONIBILI)
optrigenera.value.stato = tools.getCookie((showListaArgomenti.value ? 'INC_ES_' : '') + 'VIS_STATO', costanti.STATO.IN_COMMERCIO)