import { Head, useForm, usePage } from '@inertiajs/react'; import { FormErrors, Panel, PageTitle, controlClass, } from '@/components/procurement'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { money } from '@/types/procurement'; type Policy = { id: number; created_by: number; revision: number; status: string; mode: string; scope: string; currency: string; ceiling_minor: number; includes_tax: boolean; valid_from: string; valid_until: string; reason: string; }; type Review = { id: number; investment_policy_id: number; reviewed_by: number; decision: string; reason: string; }; function Proposal({ previousId }: { previousId: number }) { const form = useForm({ previous_id: previousId, mode: '', scope: '', currency: '', ceiling: '', includes_tax: '', valid_from: '', valid_until: '', reason: '', }); return (
{ e.preventDefault(); form.transform((d) => ({ ...d, includes_tax: d.includes_tax === '1', })); form.post('/regras-investimento'); }} >