Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 18:45:29 +00:00
co-authored by renee-png
parent bdb60f613b
commit 2ade5e8fb5
+26
View File
@@ -386,6 +386,32 @@ export function buildPleadingDoc(input: PleadingInput): Document {
});
}
// Service list (optional) — rendered on a fresh page at end
const serviceList = (input.serviceList || []).filter((c) => c.name.trim().length > 0);
if (serviceList.length > 0) {
const slTitle = (input.serviceListTitle || "SERVICE LIST").toUpperCase();
bodyParagraphs.push(
new Paragraph({
pageBreakBefore: true,
alignment: AlignmentType.CENTER,
children: [run(slTitle, { bold: true })],
}),
);
bodyParagraphs.push(emptyP());
serviceList.forEach((c, idx) => {
bodyParagraphs.push(p(c.name, { bold: true }));
if (c.role || c.company) {
bodyParagraphs.push(p([c.role, c.company].filter(Boolean).join(", ")));
}
if (c.address) {
c.address.split("\n").forEach((line) => bodyParagraphs.push(p(line)));
}
if (c.phone) bodyParagraphs.push(p(`Tel: ${c.phone}`));
if (c.email) bodyParagraphs.push(p(`Email: ${c.email}`));
if (idx < serviceList.length - 1) bodyParagraphs.push(emptyP());
});
}
return new Document({
styles: {
default: { document: { run: { font: FONT, size: SIZE } } },