-
-
{customer.name}
-
-
+
{customer.name}
-
-
- {customer.email_primary}
-
+ {customer.email_primary && (
+
+
+ {customer.email_primary}
+
+ )}
+
{customer.mobile_primary && (
diff --git a/modules/customers/src/web/components/customer-modal-selector/customer-modal-selector-field.tsx b/modules/customers/src/web/components/customer-modal-selector/customer-modal-selector-field.tsx
new file mode 100644
index 00000000..06778763
--- /dev/null
+++ b/modules/customers/src/web/components/customer-modal-selector/customer-modal-selector-field.tsx
@@ -0,0 +1,40 @@
+import { FormField, FormItem } from "@repo/shadcn-ui/components";
+
+import { Control, FieldPath, FieldValues } from "react-hook-form";
+import { CustomerModalSelector } from "./customer-modal-selector";
+
+type CustomerModalSelectorFieldProps
= {
+ control: Control;
+ name: FieldPath;
+ disabled?: boolean;
+ required?: boolean;
+ readOnly?: boolean;
+ className?: string;
+};
+
+export function CustomerModalSelectorField({
+ control,
+ name,
+ disabled = false,
+ required = false,
+ readOnly = false,
+ className,
+}: CustomerModalSelectorFieldProps) {
+ const isDisabled = disabled;
+ const isReadOnly = readOnly && !disabled;
+
+ return (
+ {
+ console.log(field);
+ return (
+
+
+
+ );
+ }}
+ />
+ );
+}
diff --git a/modules/customers/src/web/components/customer-modal-selector/index.ts b/modules/customers/src/web/components/customer-modal-selector/index.ts
index d3e79bfe..be077e63 100644
--- a/modules/customers/src/web/components/customer-modal-selector/index.ts
+++ b/modules/customers/src/web/components/customer-modal-selector/index.ts
@@ -1 +1,2 @@
export * from "./customer-modal-selector";
+export * from "./customer-modal-selector-field";