fix: complete executive narrative exports and deduplicate company questionnaire in QA
This commit is contained in:
@@ -450,8 +450,25 @@ export async function generateProjectDossierDocx(
|
||||
children.push(
|
||||
new Paragraph({ children: [new TextRun({ text: paragraph })] }),
|
||||
);
|
||||
const table = sectionTable(section);
|
||||
if (table) children.push(table);
|
||||
if (section.id === 'finance' || section.id === 'financial-report') {
|
||||
const table = sectionTable(section);
|
||||
if (table) children.push(table);
|
||||
} else {
|
||||
for (const row of section.rows)
|
||||
children.push(
|
||||
new Paragraph({
|
||||
children: [
|
||||
new TextRun({ text: `${row.field}: `, bold: true }),
|
||||
new TextRun({ text: row.value }),
|
||||
new TextRun({
|
||||
text: `${row.classification}. ${row.origin}`,
|
||||
break: 1,
|
||||
size: 18,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
);
|
||||
}
|
||||
for (const issue of financialIssuesForDisplay(section.tables ?? [])) {
|
||||
children.push(
|
||||
new Paragraph({ text: issue.message, keepNext: true }),
|
||||
@@ -665,17 +682,24 @@ export async function createProjectDossierPrintHtml(
|
||||
for (const slice of investmentReportTableSlices(entry))
|
||||
content.push(htmlTable(slice.headers, slice.rows));
|
||||
}
|
||||
if (section.rows.length && section.id !== 'financial-report')
|
||||
content.push(
|
||||
htmlTable(
|
||||
['Campo', 'Conteúdo', 'Classificação / origem'],
|
||||
section.rows.map((row) => [
|
||||
row.field,
|
||||
row.value,
|
||||
`${row.classification}. ${row.origin}`,
|
||||
]),
|
||||
),
|
||||
);
|
||||
if (section.rows.length && section.id !== 'financial-report') {
|
||||
if (section.id === 'finance')
|
||||
content.push(
|
||||
htmlTable(
|
||||
['Campo', 'Conteúdo', 'Classificação / origem'],
|
||||
section.rows.map((row) => [
|
||||
row.field,
|
||||
row.value,
|
||||
`${row.classification}. ${row.origin}`,
|
||||
]),
|
||||
),
|
||||
);
|
||||
else
|
||||
for (const row of section.rows)
|
||||
content.push(
|
||||
`<p><strong>${escapeHtml(row.field)}:</strong> ${escapeHtml(row.value)}<br><small>${escapeHtml(row.classification)}. ${escapeHtml(row.origin)}</small></p>`,
|
||||
);
|
||||
}
|
||||
if (section.id === 'annexes') {
|
||||
const selected = attachments.filter((item) => item.include);
|
||||
if (!selected.length)
|
||||
|
||||
Reference in New Issue
Block a user