fix: remove as-any casts, type Dashboard data properly
- Route handlers: add exhaustive return after error checks so TypeScript narrows the union and result properties are accessible without casts - attendance.service: use Prisma.attendanceGetPayload for included relations - projects.service: remove unnecessary cast on orders relation - Dashboard.tsx: replace Record<string,any> with proper DashData interface Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@ export async function listProjects(params: ListProjectsParams) {
|
||||
responsible_user_name: p.users
|
||||
? `${p.users.first_name} ${p.users.last_name}`.trim()
|
||||
: null,
|
||||
order_number: (p.orders as any)?.order_number || null,
|
||||
order_number: p.orders?.order_number || null,
|
||||
}));
|
||||
|
||||
return { data: enriched, total, page, limit };
|
||||
|
||||
Reference in New Issue
Block a user