Add carrierName/writingCompanyName to tasks GET and PATCH API responses

This commit is contained in:
lorentz 2026-04-13 18:20:07 +00:00
parent e712420347
commit 36076ce90d
2 changed files with 4 additions and 2 deletions

View file

@ -90,7 +90,7 @@ export async function PATCH(
data: updateData,
include: {
client: { select: { id: true, name: true } },
policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true } },
policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true, carrierName: true, writingCompanyName: true } },
policyGroup: { select: { id: true, name: true, renewalDate: true } },
assignments: { include: { user: { select: { id: true, displayName: true, email: true } } } },
},
@ -109,7 +109,7 @@ export async function PATCH(
where: { id },
include: {
client: { select: { id: true, name: true } },
policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true } },
policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true, carrierName: true, writingCompanyName: true } },
policyGroup: { select: { id: true, name: true, renewalDate: true } },
assignments: { include: { user: { select: { id: true, displayName: true, email: true } } } },
},

View file

@ -101,6 +101,8 @@ export async function GET(request: NextRequest) {
policyNumber: true,
policyType: true,
expirationDate: true,
carrierName: true,
writingCompanyName: true,
},
},
policyGroup: {