diff --git a/ondeck/src/app/(dashboard)/tasks/page-client.tsx b/ondeck/src/app/(dashboard)/tasks/page-client.tsx
index 6998b93..e524175 100644
--- a/ondeck/src/app/(dashboard)/tasks/page-client.tsx
+++ b/ondeck/src/app/(dashboard)/tasks/page-client.tsx
@@ -42,6 +42,7 @@ interface Task {
notes: string | null
client: { id: string; name: string } | null
policy: { id: string; policyNumber: string | null; policyType: string | null; expirationDate: string | Date } | null
+ policyGroup: { id: string; name: string | null; renewalDate: string | Date | null } | null
assignments: TaskAssignment[]
taskNotes: TaskNote[]
}
@@ -158,6 +159,13 @@ function TaskCard({ task: initial }: { task: Task }) {
+ {task.policyGroup ? (
+ Group
+ ) : task.policy ? (
+ Policy
+ ) : (
+ Client
+ )}
{notes.length > 0 && (
{notes.length}
@@ -177,6 +185,14 @@ function TaskCard({ task: initial }: { task: Task }) {
{task.client.name}
)}
+ {task.policyGroup && (
+
+ Group:{' '}
+
+ {task.policyGroup.name ?? (task.policyGroup.renewalDate ? formatDate(task.policyGroup.renewalDate) : task.policyGroup.id)}
+
+
+ )}
{task.policy && (
Policy:{' '}
diff --git a/ondeck/src/app/(dashboard)/tasks/page.tsx b/ondeck/src/app/(dashboard)/tasks/page.tsx
index d78f060..60ec884 100644
--- a/ondeck/src/app/(dashboard)/tasks/page.tsx
+++ b/ondeck/src/app/(dashboard)/tasks/page.tsx
@@ -20,6 +20,7 @@ export default async function TasksPage() {
include: {
client: { select: { id: true, name: true } },
policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true } },
+ policyGroup: { select: { id: true, name: true, renewalDate: true } },
assignments: {
include: { user: { select: { displayName: true, email: true } } },
},
diff --git a/ondeck/src/app/api/tasks/route.ts b/ondeck/src/app/api/tasks/route.ts
index 20d58a2..6344dc8 100644
--- a/ondeck/src/app/api/tasks/route.ts
+++ b/ondeck/src/app/api/tasks/route.ts
@@ -64,6 +64,13 @@ export async function GET(request: NextRequest) {
expirationDate: true,
},
},
+ policyGroup: {
+ select: {
+ id: true,
+ name: true,
+ renewalDate: true,
+ },
+ },
assignments: {
include: {
user: {