diff --git a/ondeck/src/app/(dashboard)/manager/page.tsx b/ondeck/src/app/(dashboard)/manager/page.tsx index 3c04097..c4a10dd 100644 --- a/ondeck/src/app/(dashboard)/manager/page.tsx +++ b/ondeck/src/app/(dashboard)/manager/page.tsx @@ -26,7 +26,7 @@ export default async function ManagerPage() { prisma.client.count({ where: { designation: { name: { in: ['Shape', 'Shape 2'] } }, - policies: { some: {} }, + policies: { some: { status: { notIn: ['Cancelled', 'Expired', 'Non-Renewed', 'Rewritten', 'Not taken'] } } }, setupNaAt: null, OR: [ { claimsAdvocateId: null }, diff --git a/ondeck/src/app/(dashboard)/manager/setup/page.tsx b/ondeck/src/app/(dashboard)/manager/setup/page.tsx index 2607835..2995007 100644 --- a/ondeck/src/app/(dashboard)/manager/setup/page.tsx +++ b/ondeck/src/app/(dashboard)/manager/setup/page.tsx @@ -34,7 +34,7 @@ export default async function SetupQueuePage() { const DEAD_STATUSES = ['Cancelled', 'Expired', 'Non-Renewed', 'Rewritten', 'Not taken'] - const [clients, skippedCount, naClients] = await Promise.all([ + const [clients, skippedClients, naClients] = await Promise.all([ prisma.client.findMany({ where: { designation: { name: { in: ['Shape', 'Shape 2'] } }, @@ -59,13 +59,15 @@ export default async function SetupQueuePage() { }, orderBy: { createdAt: 'asc' }, }), - prisma.client.count({ + prisma.client.findMany({ where: { designation: { name: { in: ['Shape', 'Shape 2'] } }, setupNaAt: null, OR: [{ claimsAdvocateId: null }, { setupCompletedAt: null }], NOT: { policies: { some: { status: { notIn: DEAD_STATUSES } } } }, }, + select: { id: true, name: true, claimsAdvocateId: true, setupCompletedAt: true, _count: { select: { policies: true } } }, + orderBy: { name: 'asc' }, }), prisma.client.findMany({ where: { @@ -110,11 +112,6 @@ export default async function SetupQueuePage() {
Clients that need a claims advocate or renewal group configuration. - {skippedCount > 0 && ( - - ({skippedCount} skipped — no active policies) - - )}
| Client | +Total Policies | +Missing | ++ |
|---|---|---|---|
| + + {c.name} + + | +{c._count.policies} | ++ {[!c.claimsAdvocateId && 'Advocate', !c.setupCompletedAt && 'Setup'].filter(Boolean).join(', ')} + | +
+ |
+