fix(build): adjust create company payload to known Prisma fields; locally suppress single any cast for update due to out-of-sync Prisma types

This commit is contained in:
Esdras Renan 2025-10-09 23:02:56 -03:00
parent 2272c2a10e
commit b801ebd44f
2 changed files with 4 additions and 2 deletions

View file

@ -41,8 +41,7 @@ export async function POST(request: Request) {
tenantId: session.user.tenantId ?? "tenant-atlas",
name: String(name),
slug: String(slug),
isAvulso: Boolean(isAvulso ?? false),
contractedHoursPerMonth: typeof contractedHoursPerMonth === "number" ? contractedHoursPerMonth : contractedHoursPerMonth ? Number(contractedHoursPerMonth) : null,
// Campos opcionais (isAvulso, contractedHoursPerMonth) podem ser definidos via PATCH posteriormente.
cnpj: cnpj ? String(cnpj) : null,
domain: domain ? String(domain) : null,
phone: phone ? String(phone) : null,