diff --git a/ondeck/src/app/(dashboard)/tasks/page-client.tsx b/ondeck/src/app/(dashboard)/tasks/page-client.tsx index b2e27aa..18b3844 100644 --- a/ondeck/src/app/(dashboard)/tasks/page-client.tsx +++ b/ondeck/src/app/(dashboard)/tasks/page-client.tsx @@ -198,6 +198,13 @@ function TaskCard({ task: initial }: { task: Task }) { } } + const levelLabel = task.policyGroup ? 'Group' : task.policy ? 'Policy' : 'Client' + const levelColor = task.policyGroup + ? 'bg-purple-500/10 text-purple-700 dark:text-purple-400' + : task.policy + ? 'bg-blue-500/10 text-blue-700 dark:text-blue-400' + : 'bg-muted text-muted-foreground' + return (
- {/* Header: title + badges + actions */} -
-
-

- {task.title} -

- - - {task.policyGroup ? ( - Group - ) : task.policy ? ( - Policy - ) : ( - Client - )} -
-
- - - {task.status !== 'COMPLETED' && task.status !== 'NA' && task.status !== 'CANCELLED' && ( - - )} - -
-
- - {/* Meta: structured two-row grid */} -
-
- {task.client && ( - Client {task.client.name} - )} - Policy # {task.policy?.policyNumber || '—'} - Type {task.policy?.policyType || '—'} - Renewal {task.policy?.expirationDate ? formatRenewalDate(task.policy.expirationDate) : '—'} - Due {formatDate(task.dueDate)} -
- {task.assignments.length > 0 && ( -
- Assigned to {task.assignments.map((a) => a.user.displayName || a.user.email).join(', ')} +
+ {/* Left: main content */} +
+
+ +

+ {task.title} +

- )} +
+ {task.client && ( + Client {task.client.name} + )} + Policy # {task.policy?.policyNumber || '—'} + Type {task.policy?.policyType || '—'} + Renewal {task.policy?.expirationDate ? formatRenewalDate(task.policy.expirationDate) : '—'} +
+ {task.assignments.length > 0 && ( +

+ Assigned to {task.assignments.map((a) => a.user.displayName || a.user.email).join(', ')} +

+ )} +
+ + {/* Right sidebar */} +
+ {/* Info: Due / Status / Level */} +
+
+ Due + {formatDate(task.dueDate)} +
+
+ Status + +
+
+ Level + {levelLabel} +
+
+ {/* Actions: 2×2 grid */} +
+ + +
+
+ {task.status !== 'COMPLETED' && task.status !== 'NA' && task.status !== 'CANCELLED' ? ( + + ) : ( + + )} + +
+
{/* Completion Dialog */}