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:
@@ -160,6 +160,7 @@ export default async function invoicesRoutes(
|
||||
`Neplatný přechod stavu z "${result.currentStatus}" na "${result.newStatus}"`,
|
||||
400,
|
||||
);
|
||||
return error(reply, "Neznámá chyba", 500);
|
||||
}
|
||||
|
||||
await logAudit({
|
||||
@@ -168,7 +169,7 @@ export default async function invoicesRoutes(
|
||||
action: "update",
|
||||
entityType: "invoice",
|
||||
entityId: id,
|
||||
description: `Upravena faktura ${(result as any).invoice_number}`,
|
||||
description: `Upravena faktura ${result.invoice_number}`,
|
||||
});
|
||||
return success(reply, { id }, 200, "Faktura byla aktualizována");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user