@@ -2436,6 +2485,7 @@
dense-toggle
expand-separator
label="Ultima Pagina"
+ v-if="false"
icon="fas fa-play-circle"
>
{{ label }}
diff --git a/src/components/CProductCard/CProductCard.ts b/src/components/CProductCard/CProductCard.ts
index 36923a38..71e8605b 100755
--- a/src/components/CProductCard/CProductCard.ts
+++ b/src/components/CProductCard/CProductCard.ts
@@ -187,7 +187,7 @@ export default defineComponent({
async function updateproduct() {
- console.log('props.id', props.id)
+ // console.log('props.id', props.id)
myproduct.value = await products.getProductById(props.id)
// products.updateQuantityAvailable(myproduct.value._id)
diff --git a/src/model/CatalogStore.ts b/src/model/CatalogStore.ts
index 7e25abbb..f46eed6f 100755
--- a/src/model/CatalogStore.ts
+++ b/src/model/CatalogStore.ts
@@ -13,6 +13,7 @@ export interface ICatalog {
idTipoFormato?: number[]
condition_andor: number,
editore?: string[]
+ editore_escludi?: string[]
collana_info?: ICollana
descr_introduttiva?: string
idPageAssigned?: string
diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js
index e47918bf..d5d9d76d 100755
--- a/src/statics/lang/it.js
+++ b/src/statics/lang/it.js
@@ -2057,6 +2057,8 @@ const msg_it = {
idPageAssigned_stampa: 'Pagina Assegnata (per STAMPA)',
descr_introduttiva: 'Descrizione Introduttiva (circa 1300 battute)',
editore: 'Marchio Editoriale',
+ editore_includi: 'Includi Editoriale',
+ editore_escludi: 'Escludi Editoriale',
versione_perstampa: 'Per Stampa',
pdf_generato: 'Pdf generato',
pdf_online: 'Pdf online Ufficiale',
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index 099415d9..131d1803 100755
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -222,7 +222,14 @@ export const colTableCatalogList = [
}),
AddCol({
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,
jointable: 'publishers_totali',
isadvanced_field: true,
diff --git a/src/store/Products.ts b/src/store/Products.ts
index 580ec456..461bb8c4 100755
--- a/src/store/Products.ts
+++ b/src/store/Products.ts
@@ -547,16 +547,18 @@ export const useProducts = defineStore('Products', {
return options;
},
- getAutoriByIdAuthors: (state: IProductsState) => (arridAuthors: []) : string => {
- let strAutori = '';
- for (const aut of arridAuthors) {
- const found = state.authors.find((rec: IAuthor) => rec._id === aut);
- if (found) {
- strAutori += found.name + (found.surname ? ' ' + found.surname : '') + ', ';
+ getAutoriByIdAuthors:
+ (state: IProductsState) =>
+ (arridAuthors: []): string => {
+ let strAutori = '';
+ for (const aut of arridAuthors) {
+ 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 => {
return state.products.length;
@@ -2236,7 +2238,7 @@ export const useProducts = defineStore('Products', {
return arr;
},
- getSchedeOpt(arrschede: ISchedaSingola[], tag?: string): any[] {
+ getSchedeOptByArrSchede(arrschede: ISchedaSingola[], tag?: string): any[] {
let arr: any = [];
const globalStore = useGlobalStore();
@@ -2538,5 +2540,22 @@ export const useProducts = defineStore('Products', {
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 '';
+ }
+ },
},
});
diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts
index aa8ef083..523ce8d3 100644
--- a/src/store/globalStore.ts
+++ b/src/store/globalStore.ts
@@ -336,16 +336,16 @@ export const useGlobalStore = defineStore('GlobalStore', {
return false;
},
- getSchedeOpt: (state: IGlobalState) => (tag?: string) => {
+ getSchedeOptByTag: (state: IGlobalState) => (tag?: string) => {
const Products = useProducts();
- return Products.getSchedeOpt(state.myschedas, tag);
+ return Products.getSchedeOptByArrSchede(state.myschedas, tag);
},
getOptCatalogoTemplate: (state: IGlobalState) => (tag?: string) => {
const Products = useProducts();
- return Products.getSchedeOpt(state.myschedas, tag);
+ return Products.getSchedeOptByArrSchede(state.myschedas, tag);
},
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 === 'sectorgoods') return state.sectorgoods;
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')
return state.provinces.filter(
(rec: IProvince) => !rec.card && rec.prov !== 'ITA' && rec.prov !== 'EST'
diff --git a/src/views/ecommerce/catalogo/catalogo.ts b/src/views/ecommerce/catalogo/catalogo.ts
index db1c0aaf..7a09e3d6 100755
--- a/src/views/ecommerce/catalogo/catalogo.ts
+++ b/src/views/ecommerce/catalogo/catalogo.ts
@@ -730,6 +730,21 @@ export default defineComponent({
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(
products: IProduct[],
searchtext: string | string[],
@@ -739,6 +754,7 @@ export default defineComponent({
filtroidTipologie: number[],
filtroidTipoFormato: number[],
editore: string[],
+ editore_escludi: string[],
idCollane: string[],
arrargomstr: any[],
op_andor: IOpAndOr,
@@ -770,6 +786,7 @@ export default defineComponent({
const boolfiltroVuotoidTipologie = filtroidTipologie.length === 0;
const boolfiltroVuotoidTipoFormato = filtroidTipoFormato.length === 0;
const boolfiltroVuotoEditore = editore.length === 0;
+ const boolfiltroVuotoEditore_escludi = editore_escludi.length === 0;
const boolfiltroVuotoCollane = idCollane.length === 0;
const boolfiltroVuotoArgomenti = arrargomstr.length === 0;
@@ -783,6 +800,7 @@ export default defineComponent({
boolfiltroVuotoidTipologie &&
boolfiltroVuotoidTipoFormato &&
boolfiltroVuotoEditore &&
+ boolfiltroVuotoEditore_escludi &&
boolfiltroVuotoCollane &&
boolfiltroVuotoArgomenti &&
catstr === '' &&
@@ -916,6 +934,11 @@ export default defineComponent({
? se_tutti_veri
: 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
const productgassel =
!gasselstr ||
@@ -943,6 +966,7 @@ export default defineComponent({
hasCollana,
hasCollanaStr,
hasPublished,
+ hasPublished_escludi,
];
// Decido se combinare in AND o OR sulla base della scelta globale
@@ -998,7 +1022,11 @@ export default defineComponent({
optcatalogo.value.idTipoFormato
);
const editore = getEditoreDaFiltrare(optcatalogo.value.editore);
+ const editore_escludi = getEditore_escludiDaFiltrare(
+ optcatalogo.value.editore_escludi
+ );
const filtroPublishers = editore || [];
+ const filtroPublishers_escludi = editore_escludi || [];
const idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane);
const filtroCollane = idCollane || [];
@@ -1046,6 +1074,7 @@ export default defineComponent({
filtroidTipologie,
filtroidTipoFormato,
filtroPublishers,
+ filtroPublishers_escludi,
filtroCollane,
arrargomstr,
op_andor,
@@ -1150,6 +1179,7 @@ export default defineComponent({
!arraysEqual(scheda.idTipologie, schedaprec?.idTipologie) ||
!arraysEqual(scheda.idTipoFormato, schedaprec?.idTipoFormato) ||
!arraysEqual(scheda.editore, schedaprec?.editore) ||
+ !arraysEqual(scheda.editore_escludi, schedaprec?.editore_escludi) ||
!arraysEqual(scheda.idCollane, schedaprec?.idCollane);
return isDifferent;
}
@@ -1163,7 +1193,9 @@ export default defineComponent({
const filtroidTipologie = scheda.idTipologie || [];
const filtroidTipoFormato = getidTipoFormatoDaFiltrare(scheda.idTipoFormato);
const editore = getEditoreDaFiltrare(scheda.editore);
+ const editore_escludi = getEditore_escludiDaFiltrare(scheda.editore_escludi);
const filtroPublishers = editore || [];
+ const filtroPublishers_escludi = editore_escludi || [];
const idCollane = getIdCollaneDaFiltrare(scheda.idCollane);
const filtroCollane = idCollane || [];
const arrargomstr =
@@ -1194,6 +1226,7 @@ export default defineComponent({
filtroidTipologie,
filtroidTipoFormato,
filtroPublishers,
+ filtroPublishers_escludi,
filtroCollane,
arrargomstr,
op_andor,
@@ -1518,7 +1551,7 @@ export default defineComponent({
// console.log('mounted Catalogo')
let mycat = null;
- let instampa = false
+ let instampa = false;
if (optcatalogo.value.idCatalogSel) {
// controlla se è stato passato l'id dalla pagina:
@@ -2581,7 +2614,7 @@ export default defineComponent({
icon: 'check',
});
} else {
- let error = ris?.error
+ let error = ris?.error;
$q.notify({
color: 'negative',
message: `PDF NON generato Errore: ${error}!`,
@@ -2864,6 +2897,12 @@ export default defineComponent({
updateCatalogoPadre();
}
+ function updatecatalogmodif(field: string, val: any) {
+ if (field) {
+ myCatalog.value[field] = val;
+ }
+ }
+
onMounted(mounted);
return {
@@ -2956,6 +2995,7 @@ export default defineComponent({
getSfondoImgCatalogo,
isStampa,
onlyCatalogoPDF,
+ updatecatalogmodif,
};
},
});
diff --git a/src/views/ecommerce/catalogo/catalogo.vue b/src/views/ecommerce/catalogo/catalogo.vue
index ad6abd7f..97109ee7 100755
--- a/src/views/ecommerce/catalogo/catalogo.vue
+++ b/src/views/ecommerce/catalogo/catalogo.vue
@@ -1547,6 +1547,7 @@
:type="costanti.FieldType.multiselect"
jointable="t_web_tipiformatos"
class="q-mb-md"
+ @save="(v) => updatecatalogmodif('idTipoFormato', v)"
:dense="false"
>
@@ -1563,6 +1564,7 @@
debounce="1000"
:type="costanti.FieldType.op_andor"
class="q-mb-md"
+ @save="(v) => updatecatalogmodif('condition_andor', v)"
:dense="false"
>
@@ -1577,6 +1579,7 @@
debounce="1000"
:type="costanti.FieldType.multiselect"
jointable="catprods"
+ @save="(v) => updatecatalogmodif('argomenti', v)"
class="q-mb-md"
:dense="false"
>
@@ -1592,6 +1595,7 @@
debounce="1000"
:type="costanti.FieldType.multiselect"
jointable="collanastotali"
+ @save="(v) => updatecatalogmodif('idCollane', v)"
class="q-mb-md"
:dense="false"
>
@@ -1599,7 +1603,7 @@
updatecatalogmodif('editore', v)"
+ class="q-mb-md"
+ :dense="false"
+ >
+
+ updatecatalogmodif('editore_escludi', v)"
class="q-mb-md"
:dense="false"
>