import { useForm } from '@inertiajs/react'; import { Panel, FormErrors, controlClass } from '@/components/procurement'; import { Button } from '@/components/ui/button'; export function PeopleContractFormalization({ id, version, }: { id: number; version: number; }) { const form = useForm<{ version: number; operation_key: string; reference: string; signed_on: string; reason: string; no_conflict: boolean; signed_document: File | null; }>({ version, operation_key: crypto.randomUUID(), reference: '', signed_on: '', reason: '', no_conflict: false, signed_document: null, }); return (
{ event.preventDefault(); if (!form.processing) form.post(`/pessoas/${id}/formalizar`, { forceFormData: true, preserveState: 'errors', preserveScroll: true, }); }} >