import React from 'react' import { Head, useForm } from '@inertiajs/react' import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout' import LocationProfileSelectionInput from '../LocationProfile/SelectionInput' import TextArea from '@/Components/TextArea' import Button from '@/Components/Button' export default function Import(props) { const { data, setData, post, processing, errors } = useForm({ script: '', location_profile_id: null, }) const handleOnChange = (event) => { setData( event.target.name, event.target.type === 'checkbox' ? event.target.checked ? 1 : 0 : event.target.value ) } const handleSubmit = () => { post(route('voucher.import')) } return (
Voucher
setData('location_profile_id', id) } error={errors.location_profile_id} />