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