- 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user