fix: validate simulator dates and reconcile QA calculations reports and language

This commit is contained in:
2026-10-20 21:00:52 +02:00
parent 59ab4fe956
commit a690c665fb
39 changed files with 757 additions and 184 deletions
+20 -1
View File
@@ -398,6 +398,15 @@ export async function generateProjectDossierDocx(
];
for (const section of model.sections) {
if (section.id === 'annexes') {
if (!attachments.some((item) => item.include)) {
children.push(
new Paragraph({
text: 'Anexos: não foram seleccionados ficheiros.',
spacing: { before: 80, after: 80 },
}),
);
continue;
}
children.push(
new Paragraph({
text: section.title,
@@ -447,7 +456,10 @@ export async function generateProjectDossierDocx(
alignment: AlignmentType.RIGHT,
children: [
new TextRun({
text: 'InvesteMoz · '+model.title.slice(0, 60)+' · privado · página ',
text:
'InvesteMoz · ' +
model.title.slice(0, 60) +
' · privado · página ',
size: 18,
}),
new SimpleField('PAGE'),
@@ -580,6 +592,13 @@ export async function createProjectDossierPrintHtml(
): Promise<string> {
const content: string[] = [];
for (const section of model.sections) {
if (
section.id === 'annexes' &&
!attachments.some((item) => item.include)
) {
content.push('<p>Anexos: não foram seleccionados ficheiros.</p>');
continue;
}
content.push(`<section><h2>${escapeHtml(section.title)}</h2>`);
for (const paragraph of section.paragraphs)
content.push(`<p>${escapeHtml(paragraph)}</p>`);