- Raccolte Cataloghi corretto e migliorato.

- Bottoni "Apri" e "PDF".
This commit is contained in:
Surya Paolo
2025-07-06 23:13:03 +02:00
parent a13635ab4e
commit 0b06f9f93a
3 changed files with 9 additions and 8 deletions

View File

@@ -422,7 +422,6 @@ class GenPdf {
}); });
} }
console.log('FINE Pubblicazione ONLINE !'); console.log('FINE Pubblicazione ONLINE !');
} }
} catch (e) { } catch (e) {
@@ -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);

View File

@@ -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();
} }
} }

View File

@@ -1 +1 @@
1.2.59 1.2.62