fix: validate simulator dates and reconcile QA calculations reports and language
This commit is contained in:
@@ -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>`);
|
||||
|
||||
Reference in New Issue
Block a user