diff --git a/src/components/clients/client-form.tsx b/src/components/clients/client-form.tsx
index 122bec6..9d4fa3d 100644
--- a/src/components/clients/client-form.tsx
+++ b/src/components/clients/client-form.tsx
@@ -16,13 +16,7 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
-import {
- Sheet,
- SheetContent,
- SheetHeader,
- SheetTitle,
- SheetFooter,
-} from '@/components/ui/sheet';
+import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetFooter } from '@/components/ui/sheet';
import { Checkbox } from '@/components/ui/checkbox';
import { Separator } from '@/components/ui/separator';
import { TagPicker } from '@/components/shared/tag-picker';
@@ -36,13 +30,7 @@ interface ClientFormProps {
client?: {
id: string;
fullName: string;
- companyName?: string | null;
nationality?: string | null;
- isProxy?: boolean;
- proxyType?: string | null;
- actualOwnerName?: string | null;
- yachtName?: string | null;
- berthSizeDesired?: string | null;
preferredContactMethod?: string | null;
preferredLanguage?: string | null;
timezone?: string | null;
@@ -53,6 +41,7 @@ interface ClientFormProps {
value: string;
label?: string | null;
isPrimary?: boolean;
+ notes?: string | null;
}>;
tags?: Array<{ id: string }>;
};
@@ -75,13 +64,11 @@ export function ClientForm({ open, onOpenChange, client }: ClientFormProps) {
defaultValues: {
fullName: '',
contacts: [{ channel: 'email', value: '', isPrimary: true }],
- isProxy: false,
tagIds: [],
},
});
const { fields, append, remove } = useFieldArray({ control, name: 'contacts' });
- const isProxy = watch('isProxy');
const tagIds = watch('tagIds') ?? [];
// Populate form when editing
@@ -89,14 +76,10 @@ export function ClientForm({ open, onOpenChange, client }: ClientFormProps) {
if (client && open) {
reset({
fullName: client.fullName,
- companyName: client.companyName ?? undefined,
nationality: client.nationality ?? undefined,
- isProxy: client.isProxy ?? false,
- proxyType: client.proxyType ?? undefined,
- actualOwnerName: client.actualOwnerName ?? undefined,
- yachtName: client.yachtName ?? undefined,
- berthSizeDesired: client.berthSizeDesired ?? undefined,
- preferredContactMethod: (client.preferredContactMethod as CreateClientInput['preferredContactMethod']) ?? undefined,
+ preferredContactMethod:
+ (client.preferredContactMethod as CreateClientInput['preferredContactMethod']) ??
+ undefined,
preferredLanguage: client.preferredLanguage ?? undefined,
timezone: client.timezone ?? undefined,
source: (client.source as CreateClientInput['source']) ?? undefined,
@@ -108,6 +91,7 @@ export function ClientForm({ open, onOpenChange, client }: ClientFormProps) {
value: c.value,
label: c.label ?? undefined,
isPrimary: c.isPrimary ?? false,
+ notes: c.notes ?? undefined,
}))
: [{ channel: 'email', value: '', isPrimary: true }],
tagIds: client.tags?.map((t) => t.id) ?? [],
@@ -116,7 +100,6 @@ export function ClientForm({ open, onOpenChange, client }: ClientFormProps) {
reset({
fullName: '',
contacts: [{ channel: 'email', value: '', isPrimary: true }],
- isProxy: false,
tagIds: [],
});
}
@@ -151,10 +134,7 @@ export function ClientForm({ open, onOpenChange, client }: ClientFormProps) {