- Generazione PDF e per Stampa
This commit is contained in:
@@ -6268,7 +6268,32 @@ module.exports = {
|
||||
return Array.from(mystr).map(char => accentsMap.get(char) || char).join('');
|
||||
},
|
||||
|
||||
getDateYYYYMMDD_Today() {
|
||||
// Ottieni la data attuale nel formato YYYY-MM-DD
|
||||
const today = new Date();
|
||||
const formattedDate = today.toISOString().split('T')[0]; // Format YYYY-MM-DD
|
||||
return formattedDate
|
||||
},
|
||||
|
||||
|
||||
convertFullFileNameToURL(idapp, fullfilename) {
|
||||
const mydir = this.getdirByIdApp(idapp);
|
||||
const myhost = this.getHostByIdApp(idapp);
|
||||
|
||||
// ++ remove mydir from fullfilename and add myhost to generate a URL
|
||||
const url = fullfilename.replace(mydir, '').replace(/\\/g, '/'); // Replace backslashes with slashes
|
||||
const myurl = myhost + '/' + url;
|
||||
|
||||
console.log('myurl', myurl);
|
||||
return myurl;
|
||||
},
|
||||
|
||||
removePathDirByFileName(idapp, fullfilename) {
|
||||
const mydir = this.getdirByIdApp(idapp);
|
||||
|
||||
// ++ remove mydir from fullfilename and add myhost to generate a URL
|
||||
const filename = fullfilename.replace(mydir, '').replace(/\\/g, '/'); // Replace backslashes with slashes
|
||||
return filename;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user