import React, { useEffect, useState } from 'react' import { useForm, Head, Link } from '@inertiajs/react' import { isEmpty } from 'lodash' import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout' import Button from '@/Components/Button' import FormInput from '@/Components/FormInput' export default function Form(props) { const { customer, levels } = props const { data, setData, post, processing, errors, reset, clearErrors } = useForm({ level: customer.level.key, paylater_limit: +customer.paylater?.limit, }) const handleOnChange = (event) => { setData( event.target.name, event.target.type === 'checkbox' ? event.target.checked ? 1 : 0 : event.target.value ) } const handleSubmit = () => { post(route('customer-verification.update', customer)) } return (
Verifikasi Customer
Customer : {customer.fullname} ( {customer.username})
Whatsapp : {customer.phone}
Level Upgrade
{errors.level && (

{errors.level}

)}
) }