- sistemato "Pare che selezionando una condizione, non sempre viene aggiornato il record !"
- Aggiunto filtro "Escludi Editoriale"
This commit is contained in:
@@ -20,6 +20,7 @@ import { CImgTitle } from '@src/components/CImgTitle';
|
|||||||
import { CImgPoster } from '@src/components/CImgPoster';
|
import { CImgPoster } from '@src/components/CImgPoster';
|
||||||
import { CTitle } from '@src/components/CTitle/index';
|
import { CTitle } from '@src/components/CTitle/index';
|
||||||
import { tools } from '@tools';
|
import { tools } from '@tools';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import { shared_consts } from '@src/common/shared_vuejs';
|
import { shared_consts } from '@src/common/shared_vuejs';
|
||||||
import { LandingFooter } from '@src/components/LandingFooter';
|
import { LandingFooter } from '@src/components/LandingFooter';
|
||||||
import { COpenStreetMap } from '@src/components/COpenStreetMap';
|
import { COpenStreetMap } from '@src/components/COpenStreetMap';
|
||||||
@@ -103,6 +104,7 @@ export default defineComponent({
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const globalStore = useGlobalStore();
|
const globalStore = useGlobalStore();
|
||||||
const catalogStore = useCatalogStore();
|
const catalogStore = useCatalogStore();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const { setmeta, getsrcbyimg } = MixinMetaTags();
|
const { setmeta, getsrcbyimg } = MixinMetaTags();
|
||||||
const { setValDb, getValDb } = MixinBase();
|
const { setValDb, getValDb } = MixinBase();
|
||||||
@@ -748,6 +750,14 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function naviga(path: string) {
|
||||||
|
router.push(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isElementoSpecifico() {
|
||||||
|
return myel.value.type === shared_consts.ELEMTYPE.CATALOGO;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(mounted);
|
onMounted(mounted);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -814,6 +824,8 @@ export default defineComponent({
|
|||||||
importPage,
|
importPage,
|
||||||
globalStore,
|
globalStore,
|
||||||
catalogStore,
|
catalogStore,
|
||||||
|
naviga,
|
||||||
|
isElementoSpecifico,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
expand-separator
|
expand-separator
|
||||||
label="Dimensioni"
|
label="Dimensioni"
|
||||||
icon="fas fa-expand-alt"
|
icon="fas fa-expand-alt"
|
||||||
|
v-if="!isElementoSpecifico()"
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<CMySlider
|
<CMySlider
|
||||||
@@ -277,6 +278,7 @@
|
|||||||
expand-separator
|
expand-separator
|
||||||
label="Allineamento"
|
label="Allineamento"
|
||||||
icon="fas fa-align-center"
|
icon="fas fa-align-center"
|
||||||
|
v-if="!isElementoSpecifico()"
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-select
|
<q-select
|
||||||
@@ -359,6 +361,7 @@
|
|||||||
expand-separator
|
expand-separator
|
||||||
label="Animazione"
|
label="Animazione"
|
||||||
icon="fas fa-play-circle"
|
icon="fas fa-play-circle"
|
||||||
|
v-if="!isElementoSpecifico()"
|
||||||
>
|
>
|
||||||
<CSelectAnimation
|
<CSelectAnimation
|
||||||
v-if="enableEdit && showAnimation"
|
v-if="enableEdit && showAnimation"
|
||||||
@@ -373,6 +376,7 @@
|
|||||||
expand-separator
|
expand-separator
|
||||||
label="Banner Iniziale"
|
label="Banner Iniziale"
|
||||||
icon="fas fa-play-circle"
|
icon="fas fa-play-circle"
|
||||||
|
v-if="!isElementoSpecifico()"
|
||||||
>
|
>
|
||||||
<div>Banner:</div>
|
<div>Banner:</div>
|
||||||
|
|
||||||
@@ -1490,7 +1494,9 @@
|
|||||||
:name="ind"
|
:name="ind"
|
||||||
dense
|
dense
|
||||||
:label="
|
:label="
|
||||||
`${ind}. ` + recscheda.scheda.name ? recscheda.scheda.name : `Scheda ` + (ind + 1)
|
`${ind}. ` + recscheda.scheda.name
|
||||||
|
? recscheda.scheda.name
|
||||||
|
: `Scheda ` + (ind + 1)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1500,7 +1506,7 @@
|
|||||||
rounded
|
rounded
|
||||||
outlined
|
outlined
|
||||||
v-model="recscheda.scheda.linkIdTemplate"
|
v-model="recscheda.scheda.linkIdTemplate"
|
||||||
:options="globalStore.getSchedeOpt('SEARCH_')"
|
:options="globalStore.getSchedeOptByTag('SEARCH_')"
|
||||||
@update:model-value="modifElem"
|
@update:model-value="modifElem"
|
||||||
label="Scheda collegata:"
|
label="Scheda collegata:"
|
||||||
style="width: 350px"
|
style="width: 350px"
|
||||||
@@ -1508,6 +1514,20 @@
|
|||||||
map-options
|
map-options
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
<q-btn
|
||||||
|
v-if="recscheda.scheda.linkIdTemplate"
|
||||||
|
icon="fas fa-edit"
|
||||||
|
label="Modifica Template"
|
||||||
|
color="primary"
|
||||||
|
@click="
|
||||||
|
naviga(
|
||||||
|
productStore.getFilePathByLinkIdTemplate(
|
||||||
|
recscheda.scheda.linkIdTemplate
|
||||||
|
)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
<q-toggle
|
<q-toggle
|
||||||
v-model="recscheda.scheda.isTemplate"
|
v-model="recscheda.scheda.isTemplate"
|
||||||
@@ -1808,7 +1828,10 @@
|
|||||||
v-model="myel.catalogo.selectedVersionStampabile"
|
v-model="myel.catalogo.selectedVersionStampabile"
|
||||||
:options="[
|
:options="[
|
||||||
{ label: 'Versione Web', value: shared_consts.PREPARA_PDF.WEB },
|
{ label: 'Versione Web', value: shared_consts.PREPARA_PDF.WEB },
|
||||||
{ label: 'Versione Stampabile', value: shared_consts.PREPARA_PDF.STAMPA },
|
{
|
||||||
|
label: 'Versione Stampabile',
|
||||||
|
value: shared_consts.PREPARA_PDF.STAMPA,
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
label="Seleziona Versione"
|
label="Seleziona Versione"
|
||||||
emit-value
|
emit-value
|
||||||
@@ -1837,6 +1860,7 @@
|
|||||||
label="Catalogo collegato:"
|
label="Catalogo collegato:"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
emit-value
|
emit-value
|
||||||
|
:disabled="myel.catalogo.dimensioni_def.isTemplate"
|
||||||
map-options
|
map-options
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
@@ -1890,7 +1914,11 @@
|
|||||||
:key="rec._id"
|
:key="rec._id"
|
||||||
:name="ind"
|
:name="ind"
|
||||||
dense
|
dense
|
||||||
:label="`${ind}. ` + rec.scheda.name ? rec.scheda.name : `Scheda ` + (ind + 1)"
|
:label="
|
||||||
|
`${ind}. ` + rec.scheda.name
|
||||||
|
? rec.scheda.name
|
||||||
|
: `Scheda ` + (ind + 1)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
</q-tab>
|
</q-tab>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
@@ -1979,7 +2007,7 @@
|
|||||||
rounded
|
rounded
|
||||||
outlined
|
outlined
|
||||||
v-model="recscheda.scheda.linkIdTemplate"
|
v-model="recscheda.scheda.linkIdTemplate"
|
||||||
:options="globalStore.getSchedeOpt()"
|
:options="globalStore.getSchedeOptByTag()"
|
||||||
@update:model-value="modifElem"
|
@update:model-value="modifElem"
|
||||||
label="Scheda collegata:"
|
label="Scheda collegata:"
|
||||||
style="width: 350px"
|
style="width: 350px"
|
||||||
@@ -1987,6 +2015,24 @@
|
|||||||
map-options
|
map-options
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
LL: {{Products.getFilePathByLinkIdTemplate(
|
||||||
|
recscheda.scheda.linkIdTemplate
|
||||||
|
)}}
|
||||||
|
<q-btn
|
||||||
|
v-if="recscheda.scheda.linkIdTemplate"
|
||||||
|
icon="fas fa-edit"
|
||||||
|
label="Modifica Template"
|
||||||
|
color="primary"
|
||||||
|
@click="
|
||||||
|
naviga(
|
||||||
|
Products.getFilePathByLinkIdTemplate(
|
||||||
|
recscheda.scheda.linkIdTemplate
|
||||||
|
)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
<CMySlideNumber
|
<CMySlideNumber
|
||||||
v-model="recscheda.scheda.scalex"
|
v-model="recscheda.scheda.scalex"
|
||||||
label="Scale X:"
|
label="Scale X:"
|
||||||
@@ -2010,7 +2056,7 @@
|
|||||||
rounded
|
rounded
|
||||||
outlined
|
outlined
|
||||||
v-model="idSchedaDaCopiare"
|
v-model="idSchedaDaCopiare"
|
||||||
:options="globalStore.getSchedeOpt()"
|
:options="globalStore.getSchedeOptByTag()"
|
||||||
@update:model-value="modifElem"
|
@update:model-value="modifElem"
|
||||||
label="Scegli Scheda"
|
label="Scegli Scheda"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
@@ -2389,7 +2435,9 @@
|
|||||||
</q-toggle>
|
</q-toggle>
|
||||||
<CMySlider
|
<CMySlider
|
||||||
label="Primi N in Classifica"
|
label="Primi N in Classifica"
|
||||||
v-model="recscheda.scheda.etichette.bestseller.quantiFattRaggiunti"
|
v-model="
|
||||||
|
recscheda.scheda.etichette.bestseller.quantiFattRaggiunti
|
||||||
|
"
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="100"
|
:max="100"
|
||||||
color="green"
|
color="green"
|
||||||
@@ -2408,6 +2456,7 @@
|
|||||||
dense-toggle
|
dense-toggle
|
||||||
expand-separator
|
expand-separator
|
||||||
label="Prima Pagina"
|
label="Prima Pagina"
|
||||||
|
v-if="false"
|
||||||
icon="fas fa-play-circle"
|
icon="fas fa-play-circle"
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -2436,6 +2485,7 @@
|
|||||||
dense-toggle
|
dense-toggle
|
||||||
expand-separator
|
expand-separator
|
||||||
label="Ultima Pagina"
|
label="Ultima Pagina"
|
||||||
|
v-if="false"
|
||||||
icon="fas fa-play-circle"
|
icon="fas fa-play-circle"
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -2462,6 +2512,7 @@
|
|||||||
dense-toggle
|
dense-toggle
|
||||||
expand-separator
|
expand-separator
|
||||||
label="Per Stampa"
|
label="Per Stampa"
|
||||||
|
v-if="tools.isAdmin()"
|
||||||
icon="fas fa-play-circle"
|
icon="fas fa-play-circle"
|
||||||
>
|
>
|
||||||
<q-toggle
|
<q-toggle
|
||||||
@@ -2527,7 +2578,10 @@
|
|||||||
</q-select>
|
</q-select>
|
||||||
<div v-if="myel.catalogo.areadistampa.format.length > 1">
|
<div v-if="myel.catalogo.areadistampa.format.length > 1">
|
||||||
Ratio:
|
Ratio:
|
||||||
{{ myel.catalogo.areadistampa.format[0] / myel.catalogo.areadistampa.format[1] }}
|
{{
|
||||||
|
myel.catalogo.areadistampa.format[0] /
|
||||||
|
myel.catalogo.areadistampa.format[1]
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<q-select
|
<q-select
|
||||||
rounded
|
rounded
|
||||||
@@ -2643,7 +2697,14 @@
|
|||||||
<div>
|
<div>
|
||||||
<q-dialog
|
<q-dialog
|
||||||
v-model="visuadd"
|
v-model="visuadd"
|
||||||
style="width: 600px; max-width: 100%; position: fixed; left: 0; top: 0; height: 100%"
|
style="
|
||||||
|
width: 600px;
|
||||||
|
max-width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
"
|
||||||
transition-show="slide-up"
|
transition-show="slide-up"
|
||||||
transition-hide="slide-down"
|
transition-hide="slide-down"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export default defineComponent({
|
|||||||
const argomentistr = ref('')
|
const argomentistr = ref('')
|
||||||
const numprodtot = ref(0)
|
const numprodtot = ref(0)
|
||||||
const editorestr = ref('')
|
const editorestr = ref('')
|
||||||
|
const editore_escludi_str = ref('')
|
||||||
|
|
||||||
const products = useProducts()
|
const products = useProducts()
|
||||||
|
|
||||||
@@ -141,6 +142,13 @@ export default defineComponent({
|
|||||||
editorestr.value += rectrovato?.name + ' '
|
editorestr.value += rectrovato?.name + ' '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
editore_escludi_str.value = ''
|
||||||
|
if (myrec.value.editore_escludi) {
|
||||||
|
for (const receditore of myrec.value.editore_escludi) {
|
||||||
|
const rectrovato: IPublisher = products.publishers.find((editore: IPublisher) => editore._id === receditore)
|
||||||
|
editores_escludi_tr.value += rectrovato?.name + ' '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
statecolor.value = 'negative'
|
statecolor.value = 'negative'
|
||||||
|
|
||||||
@@ -224,6 +232,7 @@ export default defineComponent({
|
|||||||
apriInfo,
|
apriInfo,
|
||||||
collanestr,
|
collanestr,
|
||||||
editorestr,
|
editorestr,
|
||||||
|
editorestr_escludi,
|
||||||
pagina_collegata,
|
pagina_collegata,
|
||||||
esiste_descrintro,
|
esiste_descrintro,
|
||||||
argomentistr,
|
argomentistr,
|
||||||
|
|||||||
@@ -92,6 +92,13 @@
|
|||||||
<q-icon name="fas fa-book-open" /> {{ $t('cataloglist.casaeditrice') }}:
|
<q-icon name="fas fa-book-open" /> {{ $t('cataloglist.casaeditrice') }}:
|
||||||
<span class="text-blue">{{ editorestr }}</span>
|
<span class="text-blue">{{ editorestr }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="!tools.isUtente() && editore_escludi_str && dettagli"
|
||||||
|
class="text-caption text-h7 text-grey q-pb-xs"
|
||||||
|
>
|
||||||
|
<q-icon name="fas fa-book-open" /> {{ $t('cataloglist.editore_escludi') }}:
|
||||||
|
<span class="text-blue">{{ editorestr_escludi }}</span>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!tools.isUtente() && !esiste_descrintro && dettagli"
|
v-if="!tools.isUtente() && !esiste_descrintro && dettagli"
|
||||||
class="text-caption text-h7 text-grey q-pb-xs"
|
class="text-caption text-h7 text-grey q-pb-xs"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 380px">
|
<div style="width: 380px">
|
||||||
<q-banner
|
<q-banner
|
||||||
|
v-if="label"
|
||||||
rounded
|
rounded
|
||||||
dense
|
dense
|
||||||
class="bg-blue-1 text-red"
|
class="bg-blue-1 text-red"
|
||||||
color="primary q-title"
|
color="primary q-title"
|
||||||
style="text-align: center"
|
style="text-align: center;"
|
||||||
>
|
>
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</q-banner>
|
</q-banner>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
async function updateproduct() {
|
async function updateproduct() {
|
||||||
|
|
||||||
console.log('props.id', props.id)
|
// console.log('props.id', props.id)
|
||||||
myproduct.value = await products.getProductById(props.id)
|
myproduct.value = await products.getProductById(props.id)
|
||||||
|
|
||||||
// products.updateQuantityAvailable(myproduct.value._id)
|
// products.updateQuantityAvailable(myproduct.value._id)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export interface ICatalog {
|
|||||||
idTipoFormato?: number[]
|
idTipoFormato?: number[]
|
||||||
condition_andor: number,
|
condition_andor: number,
|
||||||
editore?: string[]
|
editore?: string[]
|
||||||
|
editore_escludi?: string[]
|
||||||
collana_info?: ICollana
|
collana_info?: ICollana
|
||||||
descr_introduttiva?: string
|
descr_introduttiva?: string
|
||||||
idPageAssigned?: string
|
idPageAssigned?: string
|
||||||
|
|||||||
@@ -2057,6 +2057,8 @@ const msg_it = {
|
|||||||
idPageAssigned_stampa: 'Pagina Assegnata (per STAMPA)',
|
idPageAssigned_stampa: 'Pagina Assegnata (per STAMPA)',
|
||||||
descr_introduttiva: 'Descrizione Introduttiva (circa 1300 battute)',
|
descr_introduttiva: 'Descrizione Introduttiva (circa 1300 battute)',
|
||||||
editore: 'Marchio Editoriale',
|
editore: 'Marchio Editoriale',
|
||||||
|
editore_includi: 'Includi Editoriale',
|
||||||
|
editore_escludi: 'Escludi Editoriale',
|
||||||
versione_perstampa: 'Per Stampa',
|
versione_perstampa: 'Per Stampa',
|
||||||
pdf_generato: 'Pdf generato',
|
pdf_generato: 'Pdf generato',
|
||||||
pdf_online: 'Pdf online Ufficiale',
|
pdf_online: 'Pdf online Ufficiale',
|
||||||
|
|||||||
@@ -222,7 +222,14 @@ export const colTableCatalogList = [
|
|||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'editore',
|
name: 'editore',
|
||||||
label_trans: 'cataloglist.editore',
|
label_trans: 'cataloglist.editore_includi',
|
||||||
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
|
jointable: 'publishers_totali',
|
||||||
|
isadvanced_field: true,
|
||||||
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'editore_escludi',
|
||||||
|
label_trans: 'cataloglist.editore_escludi',
|
||||||
fieldtype: costanti.FieldType.multiselect,
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
jointable: 'publishers_totali',
|
jointable: 'publishers_totali',
|
||||||
isadvanced_field: true,
|
isadvanced_field: true,
|
||||||
|
|||||||
@@ -547,16 +547,18 @@ export const useProducts = defineStore('Products', {
|
|||||||
return options;
|
return options;
|
||||||
},
|
},
|
||||||
|
|
||||||
getAutoriByIdAuthors: (state: IProductsState) => (arridAuthors: []) : string => {
|
getAutoriByIdAuthors:
|
||||||
let strAutori = '';
|
(state: IProductsState) =>
|
||||||
for (const aut of arridAuthors) {
|
(arridAuthors: []): string => {
|
||||||
const found = state.authors.find((rec: IAuthor) => rec._id === aut);
|
let strAutori = '';
|
||||||
if (found) {
|
for (const aut of arridAuthors) {
|
||||||
strAutori += found.name + (found.surname ? ' ' + found.surname : '') + ', ';
|
const found = state.authors.find((rec: IAuthor) => rec._id === aut);
|
||||||
|
if (found) {
|
||||||
|
strAutori += found.name + (found.surname ? ' ' + found.surname : '') + ', ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return strAutori.replace(/, $/, '');
|
||||||
return strAutori.replace(/, $/, '');
|
},
|
||||||
},
|
|
||||||
|
|
||||||
getNumProdTot: (state: IProductsState) => (): number => {
|
getNumProdTot: (state: IProductsState) => (): number => {
|
||||||
return state.products.length;
|
return state.products.length;
|
||||||
@@ -2236,7 +2238,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
return arr;
|
return arr;
|
||||||
},
|
},
|
||||||
|
|
||||||
getSchedeOpt(arrschede: ISchedaSingola[], tag?: string): any[] {
|
getSchedeOptByArrSchede(arrschede: ISchedaSingola[], tag?: string): any[] {
|
||||||
let arr: any = [];
|
let arr: any = [];
|
||||||
|
|
||||||
const globalStore = useGlobalStore();
|
const globalStore = useGlobalStore();
|
||||||
@@ -2538,5 +2540,22 @@ export const useProducts = defineStore('Products', {
|
|||||||
|
|
||||||
this.userActive = userStore.my;
|
this.userActive = userStore.my;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getFilePathByLinkIdTemplate(linkidTemplate: string) {
|
||||||
|
try {
|
||||||
|
const globalStore = useGlobalStore();
|
||||||
|
const myelem = globalStore.myschedas.find((recscheda: IMyScheda) =>
|
||||||
|
(recscheda: ISchedaSingola) => recscheda.scheda._id === linkidTemplate
|
||||||
|
);
|
||||||
|
if (myelem) {
|
||||||
|
const idPage = myelem.idPageOrig;
|
||||||
|
const path = globalStore.getPathByIdPage(idPage);
|
||||||
|
return path ? '/' + path : '';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
} catch (e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -336,16 +336,16 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
getSchedeOpt: (state: IGlobalState) => (tag?: string) => {
|
getSchedeOptByTag: (state: IGlobalState) => (tag?: string) => {
|
||||||
const Products = useProducts();
|
const Products = useProducts();
|
||||||
|
|
||||||
return Products.getSchedeOpt(state.myschedas, tag);
|
return Products.getSchedeOptByArrSchede(state.myschedas, tag);
|
||||||
},
|
},
|
||||||
|
|
||||||
getOptCatalogoTemplate: (state: IGlobalState) => (tag?: string) => {
|
getOptCatalogoTemplate: (state: IGlobalState) => (tag?: string) => {
|
||||||
const Products = useProducts();
|
const Products = useProducts();
|
||||||
|
|
||||||
return Products.getSchedeOpt(state.myschedas, tag);
|
return Products.getSchedeOptByArrSchede(state.myschedas, tag);
|
||||||
},
|
},
|
||||||
|
|
||||||
getLinkIdTemplateByName: (state: IGlobalState) => (name: string) => {
|
getLinkIdTemplateByName: (state: IGlobalState) => (name: string) => {
|
||||||
@@ -556,7 +556,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
else if (table === toolsext.TABSECTORS) return state.sectors;
|
else if (table === toolsext.TABSECTORS) return state.sectors;
|
||||||
else if (table === 'sectorgoods') return state.sectorgoods;
|
else if (table === 'sectorgoods') return state.sectorgoods;
|
||||||
else if (table === 'catgrps') return state.catgrps;
|
else if (table === 'catgrps') return state.catgrps;
|
||||||
else if (table === 'schedeopt') return Products.getSchedeOpt(state.myschedas);
|
else if (table === 'schedeopt') return Products.getSchedeOptByArrSchede(state.myschedas);
|
||||||
else if (table === 'provinces')
|
else if (table === 'provinces')
|
||||||
return state.provinces.filter(
|
return state.provinces.filter(
|
||||||
(rec: IProvince) => !rec.card && rec.prov !== 'ITA' && rec.prov !== 'EST'
|
(rec: IProvince) => !rec.card && rec.prov !== 'ITA' && rec.prov !== 'EST'
|
||||||
|
|||||||
@@ -730,6 +730,21 @@ export default defineComponent({
|
|||||||
return editore;
|
return editore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getEditore_escludiDaFiltrare(def_editori?: string[]) {
|
||||||
|
let editore: string[] = [];
|
||||||
|
|
||||||
|
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
|
||||||
|
const trovatocatalogo = myCatalog.value;
|
||||||
|
|
||||||
|
if (trovatocatalogo) {
|
||||||
|
editore = trovatocatalogo.editore_escludi! || [];
|
||||||
|
} else {
|
||||||
|
editore = def_editori || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return editore;
|
||||||
|
}
|
||||||
|
|
||||||
function filterProducts(
|
function filterProducts(
|
||||||
products: IProduct[],
|
products: IProduct[],
|
||||||
searchtext: string | string[],
|
searchtext: string | string[],
|
||||||
@@ -739,6 +754,7 @@ export default defineComponent({
|
|||||||
filtroidTipologie: number[],
|
filtroidTipologie: number[],
|
||||||
filtroidTipoFormato: number[],
|
filtroidTipoFormato: number[],
|
||||||
editore: string[],
|
editore: string[],
|
||||||
|
editore_escludi: string[],
|
||||||
idCollane: string[],
|
idCollane: string[],
|
||||||
arrargomstr: any[],
|
arrargomstr: any[],
|
||||||
op_andor: IOpAndOr,
|
op_andor: IOpAndOr,
|
||||||
@@ -770,6 +786,7 @@ export default defineComponent({
|
|||||||
const boolfiltroVuotoidTipologie = filtroidTipologie.length === 0;
|
const boolfiltroVuotoidTipologie = filtroidTipologie.length === 0;
|
||||||
const boolfiltroVuotoidTipoFormato = filtroidTipoFormato.length === 0;
|
const boolfiltroVuotoidTipoFormato = filtroidTipoFormato.length === 0;
|
||||||
const boolfiltroVuotoEditore = editore.length === 0;
|
const boolfiltroVuotoEditore = editore.length === 0;
|
||||||
|
const boolfiltroVuotoEditore_escludi = editore_escludi.length === 0;
|
||||||
const boolfiltroVuotoCollane = idCollane.length === 0;
|
const boolfiltroVuotoCollane = idCollane.length === 0;
|
||||||
const boolfiltroVuotoArgomenti = arrargomstr.length === 0;
|
const boolfiltroVuotoArgomenti = arrargomstr.length === 0;
|
||||||
|
|
||||||
@@ -783,6 +800,7 @@ export default defineComponent({
|
|||||||
boolfiltroVuotoidTipologie &&
|
boolfiltroVuotoidTipologie &&
|
||||||
boolfiltroVuotoidTipoFormato &&
|
boolfiltroVuotoidTipoFormato &&
|
||||||
boolfiltroVuotoEditore &&
|
boolfiltroVuotoEditore &&
|
||||||
|
boolfiltroVuotoEditore_escludi &&
|
||||||
boolfiltroVuotoCollane &&
|
boolfiltroVuotoCollane &&
|
||||||
boolfiltroVuotoArgomenti &&
|
boolfiltroVuotoArgomenti &&
|
||||||
catstr === '' &&
|
catstr === '' &&
|
||||||
@@ -916,6 +934,11 @@ export default defineComponent({
|
|||||||
? se_tutti_veri
|
? se_tutti_veri
|
||||||
: editore.includes(product.productInfo.idPublisher);
|
: editore.includes(product.productInfo.idPublisher);
|
||||||
|
|
||||||
|
// Filtri per editore_escludi
|
||||||
|
const hasPublished_escludi = boolfiltroVuotoEditore_escludi
|
||||||
|
? se_tutti_veri
|
||||||
|
: !editore_escludi.includes(product.productInfo.idPublisher);
|
||||||
|
|
||||||
// Filtri per GAS
|
// Filtri per GAS
|
||||||
const productgassel =
|
const productgassel =
|
||||||
!gasselstr ||
|
!gasselstr ||
|
||||||
@@ -943,6 +966,7 @@ export default defineComponent({
|
|||||||
hasCollana,
|
hasCollana,
|
||||||
hasCollanaStr,
|
hasCollanaStr,
|
||||||
hasPublished,
|
hasPublished,
|
||||||
|
hasPublished_escludi,
|
||||||
];
|
];
|
||||||
|
|
||||||
// Decido se combinare in AND o OR sulla base della scelta globale
|
// Decido se combinare in AND o OR sulla base della scelta globale
|
||||||
@@ -998,7 +1022,11 @@ export default defineComponent({
|
|||||||
optcatalogo.value.idTipoFormato
|
optcatalogo.value.idTipoFormato
|
||||||
);
|
);
|
||||||
const editore = getEditoreDaFiltrare(optcatalogo.value.editore);
|
const editore = getEditoreDaFiltrare(optcatalogo.value.editore);
|
||||||
|
const editore_escludi = getEditore_escludiDaFiltrare(
|
||||||
|
optcatalogo.value.editore_escludi
|
||||||
|
);
|
||||||
const filtroPublishers = editore || [];
|
const filtroPublishers = editore || [];
|
||||||
|
const filtroPublishers_escludi = editore_escludi || [];
|
||||||
const idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane);
|
const idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane);
|
||||||
const filtroCollane = idCollane || [];
|
const filtroCollane = idCollane || [];
|
||||||
|
|
||||||
@@ -1046,6 +1074,7 @@ export default defineComponent({
|
|||||||
filtroidTipologie,
|
filtroidTipologie,
|
||||||
filtroidTipoFormato,
|
filtroidTipoFormato,
|
||||||
filtroPublishers,
|
filtroPublishers,
|
||||||
|
filtroPublishers_escludi,
|
||||||
filtroCollane,
|
filtroCollane,
|
||||||
arrargomstr,
|
arrargomstr,
|
||||||
op_andor,
|
op_andor,
|
||||||
@@ -1150,6 +1179,7 @@ export default defineComponent({
|
|||||||
!arraysEqual(scheda.idTipologie, schedaprec?.idTipologie) ||
|
!arraysEqual(scheda.idTipologie, schedaprec?.idTipologie) ||
|
||||||
!arraysEqual(scheda.idTipoFormato, schedaprec?.idTipoFormato) ||
|
!arraysEqual(scheda.idTipoFormato, schedaprec?.idTipoFormato) ||
|
||||||
!arraysEqual(scheda.editore, schedaprec?.editore) ||
|
!arraysEqual(scheda.editore, schedaprec?.editore) ||
|
||||||
|
!arraysEqual(scheda.editore_escludi, schedaprec?.editore_escludi) ||
|
||||||
!arraysEqual(scheda.idCollane, schedaprec?.idCollane);
|
!arraysEqual(scheda.idCollane, schedaprec?.idCollane);
|
||||||
return isDifferent;
|
return isDifferent;
|
||||||
}
|
}
|
||||||
@@ -1163,7 +1193,9 @@ export default defineComponent({
|
|||||||
const filtroidTipologie = scheda.idTipologie || [];
|
const filtroidTipologie = scheda.idTipologie || [];
|
||||||
const filtroidTipoFormato = getidTipoFormatoDaFiltrare(scheda.idTipoFormato);
|
const filtroidTipoFormato = getidTipoFormatoDaFiltrare(scheda.idTipoFormato);
|
||||||
const editore = getEditoreDaFiltrare(scheda.editore);
|
const editore = getEditoreDaFiltrare(scheda.editore);
|
||||||
|
const editore_escludi = getEditore_escludiDaFiltrare(scheda.editore_escludi);
|
||||||
const filtroPublishers = editore || [];
|
const filtroPublishers = editore || [];
|
||||||
|
const filtroPublishers_escludi = editore_escludi || [];
|
||||||
const idCollane = getIdCollaneDaFiltrare(scheda.idCollane);
|
const idCollane = getIdCollaneDaFiltrare(scheda.idCollane);
|
||||||
const filtroCollane = idCollane || [];
|
const filtroCollane = idCollane || [];
|
||||||
const arrargomstr =
|
const arrargomstr =
|
||||||
@@ -1194,6 +1226,7 @@ export default defineComponent({
|
|||||||
filtroidTipologie,
|
filtroidTipologie,
|
||||||
filtroidTipoFormato,
|
filtroidTipoFormato,
|
||||||
filtroPublishers,
|
filtroPublishers,
|
||||||
|
filtroPublishers_escludi,
|
||||||
filtroCollane,
|
filtroCollane,
|
||||||
arrargomstr,
|
arrargomstr,
|
||||||
op_andor,
|
op_andor,
|
||||||
@@ -1518,7 +1551,7 @@ export default defineComponent({
|
|||||||
// console.log('mounted Catalogo')
|
// console.log('mounted Catalogo')
|
||||||
let mycat = null;
|
let mycat = null;
|
||||||
|
|
||||||
let instampa = false
|
let instampa = false;
|
||||||
|
|
||||||
if (optcatalogo.value.idCatalogSel) {
|
if (optcatalogo.value.idCatalogSel) {
|
||||||
// controlla se è stato passato l'id dalla pagina:
|
// controlla se è stato passato l'id dalla pagina:
|
||||||
@@ -2581,7 +2614,7 @@ export default defineComponent({
|
|||||||
icon: 'check',
|
icon: 'check',
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let error = ris?.error
|
let error = ris?.error;
|
||||||
$q.notify({
|
$q.notify({
|
||||||
color: 'negative',
|
color: 'negative',
|
||||||
message: `PDF NON generato Errore: ${error}!`,
|
message: `PDF NON generato Errore: ${error}!`,
|
||||||
@@ -2864,6 +2897,12 @@ export default defineComponent({
|
|||||||
updateCatalogoPadre();
|
updateCatalogoPadre();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updatecatalogmodif(field: string, val: any) {
|
||||||
|
if (field) {
|
||||||
|
myCatalog.value[field] = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(mounted);
|
onMounted(mounted);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -2956,6 +2995,7 @@ export default defineComponent({
|
|||||||
getSfondoImgCatalogo,
|
getSfondoImgCatalogo,
|
||||||
isStampa,
|
isStampa,
|
||||||
onlyCatalogoPDF,
|
onlyCatalogoPDF,
|
||||||
|
updatecatalogmodif,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1547,6 +1547,7 @@
|
|||||||
:type="costanti.FieldType.multiselect"
|
:type="costanti.FieldType.multiselect"
|
||||||
jointable="t_web_tipiformatos"
|
jointable="t_web_tipiformatos"
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
|
@save="(v) => updatecatalogmodif('idTipoFormato', v)"
|
||||||
:dense="false"
|
:dense="false"
|
||||||
>
|
>
|
||||||
</CMyValueDb>
|
</CMyValueDb>
|
||||||
@@ -1563,6 +1564,7 @@
|
|||||||
debounce="1000"
|
debounce="1000"
|
||||||
:type="costanti.FieldType.op_andor"
|
:type="costanti.FieldType.op_andor"
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
|
@save="(v) => updatecatalogmodif('condition_andor', v)"
|
||||||
:dense="false"
|
:dense="false"
|
||||||
>
|
>
|
||||||
</CMyValueDb>
|
</CMyValueDb>
|
||||||
@@ -1577,6 +1579,7 @@
|
|||||||
debounce="1000"
|
debounce="1000"
|
||||||
:type="costanti.FieldType.multiselect"
|
:type="costanti.FieldType.multiselect"
|
||||||
jointable="catprods"
|
jointable="catprods"
|
||||||
|
@save="(v) => updatecatalogmodif('argomenti', v)"
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
:dense="false"
|
:dense="false"
|
||||||
>
|
>
|
||||||
@@ -1592,6 +1595,7 @@
|
|||||||
debounce="1000"
|
debounce="1000"
|
||||||
:type="costanti.FieldType.multiselect"
|
:type="costanti.FieldType.multiselect"
|
||||||
jointable="collanastotali"
|
jointable="collanastotali"
|
||||||
|
@save="(v) => updatecatalogmodif('idCollane', v)"
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
:dense="false"
|
:dense="false"
|
||||||
>
|
>
|
||||||
@@ -1599,7 +1603,7 @@
|
|||||||
<CMyValueDb
|
<CMyValueDb
|
||||||
v-if="myCatalog"
|
v-if="myCatalog"
|
||||||
:editOn="true"
|
:editOn="true"
|
||||||
:title="t('cataloglist.editore')"
|
:title="t('cataloglist.editore_includi')"
|
||||||
table="catalogs"
|
table="catalogs"
|
||||||
:id="myCatalog._id"
|
:id="myCatalog._id"
|
||||||
:rec="myCatalog"
|
:rec="myCatalog"
|
||||||
@@ -1607,6 +1611,23 @@
|
|||||||
debounce="1000"
|
debounce="1000"
|
||||||
:type="costanti.FieldType.multiselect"
|
:type="costanti.FieldType.multiselect"
|
||||||
jointable="publishers_totali"
|
jointable="publishers_totali"
|
||||||
|
@save="(v) => updatecatalogmodif('editore', v)"
|
||||||
|
class="q-mb-md"
|
||||||
|
:dense="false"
|
||||||
|
>
|
||||||
|
</CMyValueDb>
|
||||||
|
<CMyValueDb
|
||||||
|
v-if="myCatalog"
|
||||||
|
:editOn="true"
|
||||||
|
:title="t('cataloglist.editore_escludi')"
|
||||||
|
table="catalogs"
|
||||||
|
:id="myCatalog._id"
|
||||||
|
:rec="myCatalog"
|
||||||
|
mykey="editore_escludi"
|
||||||
|
debounce="1000"
|
||||||
|
:type="costanti.FieldType.multiselect"
|
||||||
|
jointable="publishers_totali"
|
||||||
|
@save="(v) => updatecatalogmodif('editore_escludi', v)"
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
:dense="false"
|
:dense="false"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user