From cfefc255b1ce075563c7ead199a24548601b2121 Mon Sep 17 00:00:00 2001 From: lorentz Date: Fri, 10 Apr 2026 15:10:37 +0000 Subject: [PATCH] Fix: client card policy count now only counts Active policies to match detail page --- ondeck/src/app/(dashboard)/clients/page.tsx | 2 +- ondeck/src/app/api/clients/route.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ondeck/src/app/(dashboard)/clients/page.tsx b/ondeck/src/app/(dashboard)/clients/page.tsx index 1fe29b3..0064060 100644 --- a/ondeck/src/app/(dashboard)/clients/page.tsx +++ b/ondeck/src/app/(dashboard)/clients/page.tsx @@ -52,7 +52,7 @@ export default async function ClientsPage() { parentClient: { select: { id: true, name: true } }, _count: { select: { - policies: true, + policies: { where: { status: 'Active' } }, tasks: true, subsidiaries: true, }, diff --git a/ondeck/src/app/api/clients/route.ts b/ondeck/src/app/api/clients/route.ts index aa9ca9d..aaa9c40 100644 --- a/ondeck/src/app/api/clients/route.ts +++ b/ondeck/src/app/api/clients/route.ts @@ -146,7 +146,7 @@ export async function GET(request: NextRequest) { parentClient: { select: { id: true, name: true } }, _count: { select: { - policies: true, + policies: { where: { status: 'Active' } }, tasks: true, subsidiaries: true, },