import React, { useState } from 'react' import { isEmpty } from 'lodash' import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout' import FormInput from '@/Components/FormInput' import Button from '@/Components/Button' import { Head, useForm } from '@inertiajs/react' import FormInputWith from '@/Components/FormInputWith' import LocationProfileSelectionInput from '../LocationProfile/SelectionInput' import TextArea from '@/Components/TextArea' import Checkbox from '@/Components/Checkbox' 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} />