- Raccolte Cataloghi corretto e migliorato.
- Bottoni "Apri" e "PDF".
This commit is contained in:
@@ -421,7 +421,6 @@ class GenPdf {
|
||||
id_catalog: catalogo._id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
console.log('FINE Pubblicazione ONLINE !');
|
||||
}
|
||||
@@ -456,17 +455,18 @@ class GenPdf {
|
||||
|
||||
const catalog = await Catalog.findById(options.idCatalog);
|
||||
if (catalog) {
|
||||
const myfilenameout = await this.getPathByPage(catalog.idPageAssigned);
|
||||
|
||||
const url =
|
||||
tools.getHostByIdApp(this.idapp) +
|
||||
'/cataloghi?id=' +
|
||||
catalog._id +
|
||||
'&stampa=' +
|
||||
'/' +
|
||||
myfilenameout +
|
||||
'?' +
|
||||
'stampa=' +
|
||||
(stampa ? '1' : '0') +
|
||||
'&hideHeader=1';
|
||||
|
||||
if (url) {
|
||||
const myfilenameout = await this.getPathByPage(catalog.idPageAssigned);
|
||||
|
||||
let addstr = stampa ? '_stampabile' : '';
|
||||
|
||||
filenamerelative = options.path + `${myfilenameout}${addstr}_generato.pdf`;
|
||||
@@ -583,7 +583,6 @@ class GenPdf {
|
||||
|
||||
const myfile = stampa ? myrec.pdf_generato_stampa : myrec.pdf_generato;
|
||||
|
||||
|
||||
if (myfile && (await tools.isFileExistsAsync(mydir + myfile))) {
|
||||
// Aggiorna il PDF OnLine, copiando il file da Generato a OnLine
|
||||
let fileOrigin = mydir + (stampa ? myrec.pdf_generato_stampa : myrec.pdf_generato);
|
||||
|
||||
@@ -725,6 +725,7 @@ router.post('/join-pdf', authenticate, async (req, res) => {
|
||||
raccolta.pdf_generato_stampa = ris_stampa.outputPath;
|
||||
let myfilecheckstampa = path.join(mydirpath, ris_stampa.outputPath);
|
||||
raccolta.pdf_generato_stampa_size = await tools.getSizeFile(myfilecheckstampa);
|
||||
raccolta.data_generato_stampa = tools.getDateNow();
|
||||
}
|
||||
} else {
|
||||
// Creazione file per WEB
|
||||
@@ -733,6 +734,7 @@ router.post('/join-pdf', authenticate, async (req, res) => {
|
||||
raccolta.pdf_generato = ris.outputPath;
|
||||
let myfilecheck = path.join(mydirpath, ris.outputPath);
|
||||
raccolta.pdf_generato_size = await tools.getSizeFile(myfilecheck);
|
||||
raccolta.data_generato = tools.getDateNow();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.59
|
||||
1.2.62
|
||||
Reference in New Issue
Block a user