diff --git a/src/routes/documents.pleading.new.tsx b/src/routes/documents.pleading.new.tsx index 5a4c5ed..a8dc10c 100644 --- a/src/routes/documents.pleading.new.tsx +++ b/src/routes/documents.pleading.new.tsx @@ -444,7 +444,141 @@ function PleadingNewPage() { - {/* Footer */} + {/* Service list (optional) */} + + +
+
+ +

+ Optional. If you add any contacts, a dedicated page is appended to the pleading listing each one. +

+
+ { + setServiceList((prev) => [ + ...prev, + { + name: c.name, + role: c.title || undefined, + company: c.company || undefined, + email: c.email || undefined, + phone: c.phone || undefined, + address: "", + }, + ]); + }} + /> +
+ +
+ + setServiceListTitle(e.target.value)} + placeholder="SERVICE LIST" + /> +
+ + {serviceList.length === 0 ? ( +
+ No contacts added. Use “Add from contacts” to include a service list page. +
+ ) : ( +
+ {serviceList.map((c, idx) => ( +
+
+
+ + setServiceList((prev) => + prev.map((x, i) => (i === idx ? { ...x, name: e.target.value } : x)), + ) + } + /> + + setServiceList((prev) => + prev.map((x, i) => (i === idx ? { ...x, role: e.target.value } : x)), + ) + } + /> + + setServiceList((prev) => + prev.map((x, i) => (i === idx ? { ...x, company: e.target.value } : x)), + ) + } + /> + + setServiceList((prev) => + prev.map((x, i) => (i === idx ? { ...x, email: e.target.value } : x)), + ) + } + /> + + setServiceList((prev) => + prev.map((x, i) => (i === idx ? { ...x, phone: e.target.value } : x)), + ) + } + /> +