- sistemato "Pare che selezionando una condizione, non sempre viene aggiornato il record !"

- Aggiunto filtro "Escludi Editoriale"
This commit is contained in:
Surya Paolo
2025-06-04 15:46:29 +02:00
parent 12f816b738
commit 06fe6eb861
13 changed files with 209 additions and 29 deletions

View File

@@ -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 '';
}
},
},
});