fix(qa): reconcile report summary and separate Word period tables

This commit is contained in:
2026-11-20 12:14:08 +02:00
parent d367e18eec
commit 722322f9f6
6 changed files with 157 additions and 4 deletions
+9 -2
View File
@@ -456,12 +456,19 @@ export async function generateProjectDossierDocx(
new Paragraph({
text: entry.title,
heading: HeadingLevel.HEADING_2,
keepNext: true,
}),
);
for (const note of [...entry.issues, ...entry.notes])
children.push(new Paragraph(note));
for (const slice of investmentReportTableSlices(entry))
children.push(new Paragraph({ text: note, keepNext: true }));
for (const slice of investmentReportTableSlices(entry)) {
// Word merges adjacent tables and then repeats the first
// table's period header on subsequent pages.
children.push(
new Paragraph({ spacing: { before: 0, after: 0 } }),
);
children.push(tableForDocx(slice.headers, slice.rows));
}
}
if (!section.rows.length && !section.paragraphs.length)
children.push(