- Sistemato link pdf che ogni volta che si aggiorna prendeva il PDF dalla cache...

- Raccolta Cataloghi, procedura che li AUTO genera in automatico.
This commit is contained in:
Surya Paolo
2025-06-13 17:45:57 +02:00
parent 286cc4e3a7
commit f146b36173
24 changed files with 353 additions and 188 deletions

View File

@@ -129,7 +129,7 @@ export const useCatalogStore = defineStore('CatalogStore', {
if (catalog) {
// Update catalog from server
const indelem = this.catalogs.findIndex(
(reccatalog: ICatalogCompleto) => reccatalog._id === catalog._id
(reccatalog: ICatalog) => reccatalog._id === catalog._id
);
if (indelem >= 0) {
this.catalogs[indelem] = { ...catalog };
@@ -137,5 +137,21 @@ export const useCatalogStore = defineStore('CatalogStore', {
}
}
},
async updateRecordInMem(table: string, mydata: any) {
if (table === shared_consts.TABLES_RACCOLTACATALOGHIS) {
const index = this.raccoltacataloghis.findIndex(
(item) => item._id === mydata._id
);
if (index !== -1) {
this.raccoltacataloghis.splice(index, 1, mydata);
} else {
console.error('Non trovo il record da aggiornare', mydata);
}
}
}
},
});

View File

@@ -10682,11 +10682,11 @@ export const tools = {
return 0;
}
},
getURLByHostAndFilePath(filepath: string) {
getURLByHostAndFilePath(filepath: string, timestamp: string = '') {
try {
let myurl = filepath.startsWith('/')
? tools.getHost() + filepath
: tools.getHost() + '/' + filepath;
: tools.getHost() + '/' + filepath + `?ts=${timestamp}`;
return myurl;
} catch (e) {
return filepath;