42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
|
|
'use client';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Berth-detail "Send to client" dialog (Phase 7 §5.6 / §5.7).
|
||
|
|
*
|
||
|
|
* Thin wrapper around {@link SendDocumentDialog} that pins documentKind to
|
||
|
|
* `berth_pdf`. Used by the berth detail page header action and by the
|
||
|
|
* recommender panel quick-send shortcut.
|
||
|
|
*/
|
||
|
|
import { SendDocumentDialog } from '@/components/shared/send-document-dialog';
|
||
|
|
|
||
|
|
interface SendBerthPdfDialogProps {
|
||
|
|
open: boolean;
|
||
|
|
onOpenChange: (open: boolean) => void;
|
||
|
|
berthId: string;
|
||
|
|
berthMooringNumber: string;
|
||
|
|
recipient: { clientId?: string; email?: string; interestId?: string };
|
||
|
|
onSent?: () => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function SendBerthPdfDialog({
|
||
|
|
open,
|
||
|
|
onOpenChange,
|
||
|
|
berthId,
|
||
|
|
berthMooringNumber,
|
||
|
|
recipient,
|
||
|
|
onSent,
|
||
|
|
}: SendBerthPdfDialogProps) {
|
||
|
|
return (
|
||
|
|
<SendDocumentDialog
|
||
|
|
open={open}
|
||
|
|
onOpenChange={onOpenChange}
|
||
|
|
documentKind="berth_pdf"
|
||
|
|
recipient={recipient}
|
||
|
|
context={{ berthId }}
|
||
|
|
title={`Send berth ${berthMooringNumber} spec sheet`}
|
||
|
|
subtitle="The current PDF version is attached automatically."
|
||
|
|
onSent={onSent}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|