import { Head, Link, useForm } from '@inertiajs/react'; import { PageTitle, Panel, FormErrors, controlClass, } from '@/components/procurement'; import { Button } from '@/components/ui/button'; type Entry = { id: number; code: string; name: string; unit: string; stock_basis: string; version: number; category: string; purchase_type: string; published: boolean; source_current: boolean; }; function EntryForm({ entry }: { entry: Entry }) { const form = useForm({ version: entry.version, stock_basis: entry.stock_basis, category: entry.category, purchase_type: entry.purchase_type, published: entry.published, reason: '', }); return (
{ event.preventDefault(); form.post(`/stock/catalogo/${entry.id}`, { preserveScroll: true, }); }} >