// Documents page with e-signature flow function DocumentsPage({ persona, employeeId, savedSignedIds }) { const [filter, setFilter] = React.useState("all"); const [openDoc, setOpenDoc] = React.useState(null); // Merge default signed docs with any saved from the database const defaultSigned = new Set(DOCS.filter(d => d.status === "signed").map(d => d.id)); const [signedIds, setSignedIds] = React.useState(() => { if (savedSignedIds && savedSignedIds.size > 0) { return new Set([...defaultSigned, ...savedSignedIds]); } return defaultSigned; }); // Sync if parent passes updated savedSignedIds (e.g. after API load) React.useEffect(() => { if (savedSignedIds && savedSignedIds.size > 0) { setSignedIds(new Set([...defaultSigned, ...savedSignedIds])); } }, [savedSignedIds]); const filtered = DOCS.filter(d => { if (filter === "pending") return !signedIds.has(d.id); if (filter === "signed") return signedIds.has(d.id); return true; }); const handleSign = async (id) => { setSignedIds(prev => new Set([...prev, id])); if (employeeId && window.onboardingAPI) { try { await window.onboardingAPI.apiSignDoc(employeeId, id); } catch (e) {} } }; const total = DOCS.length; const signed = signedIds.size; const pct = Math.round(signed / total * 100); return (
Government forms, employment paperwork, and policy acknowledgements. All signatures are legally binding under the U.S. ESIGN Act.
| Document | Category | Pages | Status / Due | ||
|---|---|---|---|---|---|
|
isSigned ? null : setOpenDoc(d)}>
|
{d.title}
{d.priority === "high" && !isSigned && High priority }
{isSigned && Signed {d.signedOn} }
|
{d.category} | {d.pages} pages |
{isSigned
? |
{isSigned ? ( ) : ( )} |
By signing below, I, {PROFILE.legalName}, acknowledge that I have read and understood the terms of this document and agree to be bound by them under the U.S. ESIGN Act.
Signed at {new Date().toLocaleString()} from IP 73.42.118.204
A copy of {doc.title} has been emailed to {PROFILE.email}. People Ops has been notified.
Effective date: May 11, 2026 · Document ID DSGN-{doc.id.toUpperCase()}-9F2A
Employee: {PROFILE.legalName} ({PROFILE.email})
Position: Software Engineer, Platform — Voice Infrastructure
This {doc.category.toLowerCase()} document outlines the terms and obligations of {PROFILE.legalName} (the "Employee") as they relate to Convoso, Inc. (the "Company"). By signing below, the Employee acknowledges that they have read this document in its entirety and agree to its terms.
The Employee confirms that all information provided herein is accurate to the best of their knowledge. The Employee further agrees to comply with all applicable Company policies, including but not limited to the Employee Handbook and Code of Conduct.