Fix TypeScript build errors

This commit is contained in:
gpt-engineer-app[bot]
2025-10-12 16:22:57 +00:00
parent 5637b37ebc
commit dd079bd5a5
12 changed files with 52 additions and 140 deletions

View File

@@ -23,30 +23,6 @@ import { useNavigate } from 'react-router-dom';
type OperatorFormData = z.infer<typeof entitySchemas.operator>;
// Input type for the form (before transformation)
type OperatorFormInput = {
name: string;
slug: string;
description?: string;
person_type: 'company' | 'individual' | 'firm' | 'organization';
website_url?: string;
founded_year?: string;
founded_date?: string;
founded_date_precision?: string;
headquarters_location?: string;
images?: {
uploaded: Array<{
url: string;
cloudflare_id?: string;
file?: any;
isLocal?: boolean;
caption?: string;
}>;
banner_assignment?: number | null;
card_assignment?: number | null;
};
};
interface OperatorFormProps {
onSubmit: (data: OperatorFormData) => void;
onCancel: () => void;
@@ -70,7 +46,7 @@ export function OperatorForm({ onSubmit, onCancel, initialData }: OperatorFormPr
setValue,
watch,
formState: { errors }
} = useForm<OperatorFormInput>({
} = useForm({
resolver: zodResolver(entitySchemas.operator),
defaultValues: {
name: initialData?.name || '',