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:
@@ -9,6 +9,9 @@ type DocumentRow = {
|
||||
sentAt: Date | null;
|
||||
signedAt: Date | null;
|
||||
clientId: string;
|
||||
signedCount?: number | null;
|
||||
totalSigners?: number | null;
|
||||
hasMultipleSigners?: 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" }}>
|
||||
<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 style={{ padding: "0.875rem 1.5rem", color: "#6B7280" }}>
|
||||
{row.sentAt
|
||||
|
||||
Reference in New Issue
Block a user