feat(reports): hours by client (CSV + UI), company contracted hours, UI to manage companies; adjust ticket list spacing
This commit is contained in:
parent
3bafcc5a0a
commit
70f91f5bbd
10 changed files with 294 additions and 4 deletions
|
|
@ -16,6 +16,10 @@ export async function PATCH(request: Request, { params }: { params: Promise<{ id
|
|||
if (key in body) updates[key] = body[key] ?? null
|
||||
}
|
||||
if ("isAvulso" in body) updates.isAvulso = Boolean(body.isAvulso)
|
||||
if ("contractedHoursPerMonth" in body) {
|
||||
const raw = body.contractedHoursPerMonth
|
||||
updates.contractedHoursPerMonth = typeof raw === "number" ? raw : raw ? Number(raw) : null
|
||||
}
|
||||
|
||||
try {
|
||||
const company = await prisma.company.update({ where: { id }, data: updates as any })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue