feat(16-04): render N/M signed badge in DocumentsTable Status column

- Extend DocumentRow type with optional signedCount, totalSigners, hasMultipleSigners
- Render badge after StatusBadge only for multi-signer Sent documents (D-11, D-12, D-13)
- Badge: inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-50 text-blue-700 ml-1.5
- Shows '{N}/{M} signed' text from server-computed token counts
- No badge for single-signer or fully-signed documents
This commit is contained in:
Chandler Copeland
2026-04-03 16:31:04 -06:00
parent ad4e27af42
commit 29557f06e0

View File

@@ -9,6 +9,9 @@ type DocumentRow = {
sentAt: Date | null; sentAt: Date | null;
signedAt: Date | null; signedAt: Date | null;
clientId: string; clientId: string;
signedCount?: number | null;
totalSigners?: number | null;
hasMultipleSigners?: boolean;
}; };
type Props = { rows: DocumentRow[]; showClientColumn?: boolean }; type Props = { rows: DocumentRow[]; showClientColumn?: boolean };
@@ -62,6 +65,11 @@ export function DocumentsTable({ rows, showClientColumn = true }: Props) {
)} )}
<td style={{ padding: "0.875rem 1.5rem" }}> <td style={{ padding: "0.875rem 1.5rem" }}>
<StatusBadge status={row.status} /> <StatusBadge status={row.status} />
{row.hasMultipleSigners && row.status === "Sent" && row.totalSigners != null && row.totalSigners > 0 && (
<span className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-50 text-blue-700 ml-1.5">
{row.signedCount ?? 0}/{row.totalSigners} signed
</span>
)}
</td> </td>
<td style={{ padding: "0.875rem 1.5rem", color: "#6B7280" }}> <td style={{ padding: "0.875rem 1.5rem", color: "#6B7280" }}>
{row.sentAt {row.sentAt