@@ -1589,7 +1590,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
Localizações e unidades
-
+
Registre filiais, data centers ou unidades críticas.
@@ -1712,7 +1713,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
Horários de atendimento
-
+
@@ -1744,7 +1745,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
Tipos de solicitação
-
+
@@ -1753,7 +1754,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
{editor?.mode === "edit" ? (
Dispositivos vinculadas
-
+
@@ -1763,7 +1764,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
Contratos e escopo
-
+
@@ -1935,7 +1936,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
SLA e horários de atendimento
-
+
@@ -2029,7 +2030,7 @@ export function CompanySheet({ tenantId, editor, onClose, onCreated, onUpdated }
Metadados e observações
-
+
(val === "" || Number.isNaN(val) ? null : val),
+ z.number().min(0).nullable().optional()
+ ),
businessHours: businessHoursSchema.nullish(),
communicationChannels: communicationChannelsSchema.default({
supportEmails: [],
@@ -384,7 +383,10 @@ export const companyFormSchema = z.object({
customFields: z.array(customFieldSchema).default([]),
notes: z.string().trim().nullable().optional(),
isAvulso: z.boolean().default(false),
- reopenWindowDays: z.number().int().min(1).max(90).nullable().optional(),
+ reopenWindowDays: z.preprocess(
+ (val) => (val === "" || Number.isNaN(val) ? null : val),
+ z.number().int().min(1).max(90).nullable().optional()
+ ),
})
export type CompanyFormValues = z.infer