import { TaxesMultiSelectField } from "@erp/core/components"; import { Description, Field, FieldGroup, Fieldset, Legend, TextAreaField, TextField, } from "@repo/rdx-ui/components"; import { FormControl, FormField, FormItem, FormLabel, FormMessage, RadioGroup, RadioGroupItem, } from "@repo/shadcn-ui/components"; import { useFormContext, useWatch } from "react-hook-form"; import { useTranslation } from "../../i18n"; import { CustomerFormData } from "../../schemas"; export const CustomerBasicInfoFields = () => { const { t } = useTranslation(); const { control } = useFormContext(); const isCompany = useWatch({ control, name: "is_company", defaultValue: "true", }); return (
Identificación descripción ( {t("form_fields.customer_type.label")} { field.onChange(value === "false" ? "false" : "true"); }} defaultValue={field.value ? "true" : "false"} className='flex items-center gap-8' > {t("form_fields.customer_type.company")} {t("form_fields.customer_type.individual")} )} /> {isCompany === "false" ? ( ) : ( <> )}
); };