import { CancelButton, FormDatePickerField, FormTextAreaField, FormTextField } from "@/components"; import { t } from "i18next"; import { ChevronLeft } from "lucide-react"; import { SubmitButton } from "@/components"; import { Button, Form } from "@/ui"; import { SubmitHandler, useForm } from "react-hook-form"; import { useQuotes } from "./hooks"; type QuoteDataForm = { id: string; status: string; date: string; reference: string; customer_information: string; lang_code: string; currency_code: string; payment_method: string; notes: string; validity: string; items: any[]; }; /*type QuoteCreateProps = { isOverModal?: boolean; };*/ export const QuoteCreate = () => { //const [loading, setLoading] = useState(false); //const { data: userIdentity } = useGetIdentity(); //console.log(userIdentity); const { useMutation } = useQuotes(); const { mutate } = useMutation; const form = useForm({ defaultValues: { reference: "", date: Date.now().toLocaleString(), customer_information: "", }, }); const onSubmit: SubmitHandler = async (formData) => { alert(JSON.stringify(formData)); try { //setLoading(true); mutate(formData); } finally { //setLoading(false); } }; return (

{t("quotes.create.title")}

); };