fix(qa): review package one deficits and print layout pending acceptance
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
WidthType,
|
||||
} from 'docx';
|
||||
import JSZip from 'jszip';
|
||||
import { displayReportMoney } from './integral-financial-report.ts';
|
||||
import { investmentReportTableSlices } from './integral-financial-report.ts';
|
||||
import {
|
||||
classifyDossierAttachment,
|
||||
MAX_EMBEDDED_TEXT_BYTES,
|
||||
@@ -460,26 +460,8 @@ export async function generateProjectDossierDocx(
|
||||
);
|
||||
for (const note of [...entry.issues, ...entry.notes])
|
||||
children.push(new Paragraph(note));
|
||||
// Repeat the rubric with at most four periods per page-width table.
|
||||
for (let start = 1; start < entry.headers.length; start += 4) {
|
||||
const indices = [
|
||||
0,
|
||||
...Array.from(
|
||||
{ length: Math.min(4, entry.headers.length - start) },
|
||||
(_, i) => start + i,
|
||||
),
|
||||
];
|
||||
children.push(
|
||||
tableForDocx(
|
||||
indices.map((i) => entry.headers[i]),
|
||||
entry.rows.map((row) =>
|
||||
indices.map((i) =>
|
||||
displayReportMoney(row[i] ?? ''),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
for (const slice of investmentReportTableSlices(entry))
|
||||
children.push(tableForDocx(slice.headers, slice.rows));
|
||||
}
|
||||
if (!section.rows.length && !section.paragraphs.length)
|
||||
children.push(
|
||||
@@ -644,12 +626,8 @@ export async function createProjectDossierPrintHtml(
|
||||
content.push(`<h3>${escapeHtml(entry.title)}</h3>`);
|
||||
for (const note of [...entry.issues, ...entry.notes])
|
||||
content.push(`<p>${escapeHtml(note)}</p>`);
|
||||
content.push(
|
||||
`<div style="overflow-x:auto">${htmlTable(
|
||||
entry.headers,
|
||||
entry.rows.map((row) => row.map(displayReportMoney)),
|
||||
)}</div>`,
|
||||
);
|
||||
for (const slice of investmentReportTableSlices(entry))
|
||||
content.push(htmlTable(slice.headers, slice.rows));
|
||||
}
|
||||
if (section.rows.length)
|
||||
content.push(
|
||||
|
||||
Reference in New Issue
Block a user