diff --git a/src/app/api/v1/documents/generate-eoi/route.ts b/src/app/api/v1/documents/generate-eoi/route.ts
deleted file mode 100644
index 76e09b5..0000000
--- a/src/app/api/v1/documents/generate-eoi/route.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { NextResponse } from 'next/server';
-
-import { withAuth, withPermission } from '@/lib/api/helpers';
-import { parseBody } from '@/lib/api/route-helpers';
-import { errorResponse } from '@/lib/errors';
-import { generateEoi } from '@/lib/services/documents.service';
-import { generateEoiSchema } from '@/lib/validators/documents';
-
-export const POST = withAuth(
- withPermission('documents', 'create', async (req, ctx) => {
- try {
- const body = await parseBody(req, generateEoiSchema);
- const doc = await generateEoi(body.interestId, ctx.portId, {
- userId: ctx.userId,
- portId: ctx.portId,
- ipAddress: ctx.ipAddress,
- userAgent: ctx.userAgent,
- });
- return NextResponse.json({ data: doc }, { status: 201 });
- } catch (error) {
- return errorResponse(error);
- }
- }),
-);
diff --git a/src/components/clients/client-detail-header.tsx b/src/components/clients/client-detail-header.tsx
index c040f95..81279b8 100644
--- a/src/components/clients/client-detail-header.tsx
+++ b/src/components/clients/client-detail-header.tsx
@@ -15,13 +15,7 @@ interface ClientDetailHeaderProps {
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;
@@ -36,13 +30,7 @@ interface ClientDetailHeaderProps {
type ClientFormClient = {
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;
@@ -67,8 +55,7 @@ export function ClientDetailHeader({ client }: ClientDetailHeaderProps) {
const isArchived = !!client.archivedAt;
const archiveMutation = useMutation({
- mutationFn: () =>
- apiFetch(`/api/v1/clients/${client.id}`, { method: 'DELETE' }),
+ mutationFn: () => apiFetch(`/api/v1/clients/${client.id}`, { method: 'DELETE' }),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['clients', client.id] });
queryClient.invalidateQueries({ queryKey: ['clients'] });
@@ -77,8 +64,7 @@ export function ClientDetailHeader({ client }: ClientDetailHeaderProps) {
});
const restoreMutation = useMutation({
- mutationFn: () =>
- apiFetch(`/api/v1/clients/${client.id}/restore`, { method: 'POST' }),
+ mutationFn: () => apiFetch(`/api/v1/clients/${client.id}/restore`, { method: 'POST' }),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['clients', client.id] });
queryClient.invalidateQueries({ queryKey: ['clients'] });
@@ -86,10 +72,12 @@ export function ClientDetailHeader({ client }: ClientDetailHeaderProps) {
},
});
- const primaryEmail = client.contacts?.find((c) => c.channel === 'email' && c.isPrimary)
- ?? client.contacts?.find((c) => c.channel === 'email');
- const primaryPhone = client.contacts?.find((c) => c.channel === 'phone' && c.isPrimary)
- ?? client.contacts?.find((c) => c.channel === 'phone');
+ const primaryEmail =
+ client.contacts?.find((c) => c.channel === 'email' && c.isPrimary) ??
+ client.contacts?.find((c) => c.channel === 'email');
+ const primaryPhone =
+ client.contacts?.find((c) => c.channel === 'phone' && c.isPrimary) ??
+ client.contacts?.find((c) => c.channel === 'phone');
return (
<>
@@ -97,23 +85,14 @@ export function ClientDetailHeader({ client }: ClientDetailHeaderProps) {
-
- {client.fullName}
-
+ {client.fullName}
{isArchived && (
- Archived
- )}
- {client.isProxy && (
-
- Proxy {client.proxyType ? `(${client.proxyType.replace('_', ' ')})` : ''}
+
+ Archived
)}
- {client.companyName && (
-
{client.companyName}
- )}
-
{client.source && (
@@ -148,11 +127,7 @@ export function ClientDetailHeader({ client }: ClientDetailHeaderProps) {
{/* Actions */}
-