Update Next.js and dependencies
This commit is contained in:
parent
c79ba4638c
commit
2c975edd09
10 changed files with 96 additions and 41 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { Prisma, type Company } from "@prisma/client"
|
||||
import { prisma } from "@/lib/prisma"
|
||||
import { ZodError } from "zod"
|
||||
|
||||
import { prisma } from "@/lib/prisma"
|
||||
|
||||
import {
|
||||
companyFormSchema,
|
||||
companyInputSchema,
|
||||
|
|
@ -72,6 +73,8 @@ const STATE_REGISTRATION_TYPE_FROM_PRISMA: Record<
|
|||
SIMPLES: "simples",
|
||||
}
|
||||
|
||||
const JSON_NULL_VALUE = Prisma.JsonNull as unknown as Prisma.InputJsonValue
|
||||
|
||||
const COMPANY_LEGACY_SELECT = {
|
||||
id: true,
|
||||
tenantId: true,
|
||||
|
|
@ -343,7 +346,7 @@ export function buildCompanyData(payload: CompanyFormValues, tenantId: string):
|
|||
stateRegistrationType,
|
||||
primaryCnae: payload.primaryCnae ?? null,
|
||||
timezone: payload.businessHours?.timezone ?? null,
|
||||
businessHours: payload.businessHours ?? Prisma.JsonNull,
|
||||
businessHours: payload.businessHours ?? JSON_NULL_VALUE,
|
||||
supportEmail: payload.supportEmail ?? null,
|
||||
billingEmail: payload.billingEmail ?? null,
|
||||
contactPreferences:
|
||||
|
|
@ -353,21 +356,21 @@ export function buildCompanyData(payload: CompanyFormValues, tenantId: string):
|
|||
supportEmail: payload.supportEmail ?? null,
|
||||
billingEmail: payload.billingEmail ?? null,
|
||||
} satisfies Prisma.InputJsonValue)
|
||||
: Prisma.JsonNull,
|
||||
: JSON_NULL_VALUE,
|
||||
clientDomains: payload.clientDomains,
|
||||
communicationChannels,
|
||||
fiscalAddress: payload.fiscalAddress ?? Prisma.JsonNull,
|
||||
fiscalAddress: payload.fiscalAddress ?? JSON_NULL_VALUE,
|
||||
hasBranches: payload.hasBranches ?? false,
|
||||
regulatedEnvironments: payload.regulatedEnvironments,
|
||||
privacyPolicyAccepted: payload.privacyPolicy?.accepted ?? false,
|
||||
privacyPolicyReference: payload.privacyPolicy?.reference ?? null,
|
||||
privacyPolicyMetadata: privacyPolicyMetadata
|
||||
? (privacyPolicyMetadata as Prisma.InputJsonValue)
|
||||
: Prisma.JsonNull,
|
||||
: JSON_NULL_VALUE,
|
||||
contacts: payload.contacts,
|
||||
locations: payload.locations,
|
||||
contracts: payload.contracts,
|
||||
sla: payload.sla ?? Prisma.JsonNull,
|
||||
sla: payload.sla ?? JSON_NULL_VALUE,
|
||||
tags: payload.tags,
|
||||
customFields: payload.customFields,
|
||||
notes: payload.notes ?? null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue