diff --git a/apps/dashboard/modules/customers/customer-form.tsx b/apps/dashboard/modules/customers/customer-form.tsx index 0f6249c..c2545ff 100644 --- a/apps/dashboard/modules/customers/customer-form.tsx +++ b/apps/dashboard/modules/customers/customer-form.tsx @@ -114,7 +114,7 @@ function mapFormToPayload(values: CustomerFormValues) { const mapLookupOption = (item: any) => ({ value: String(item.id), - label: item.title||item.name || `#${item.id}`, + label: item.title || item.name || `#${item.id}`, }) const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label || o.name || `#${o.id}` } @@ -134,6 +134,7 @@ export function CustomerForm({ resourceId, initialData, onSuccess }: CustomerFor mapToFormValues: mapCustomerToFormValues, }) + const { customer_type} = form.watch() const { mutate, error, isPending } = useFormMutation(form, { mutationFn: (values: CustomerFormValues) => { const payload = mapFormToPayload(values) @@ -174,7 +175,7 @@ export function CustomerForm({ resourceId, initialData, onSuccess }: CustomerFor options={SALUTATION_OPTIONS} /> - + + { + customer_type?.label === "Company" && + + } {/* Contact */}