feat(uat-batch-7): Wave-2 polish — Open-in-Documents, berth label, residential, NotesList parity
- InterestEoiTab history link renamed "Open" → "Open in Documents" so the cross-section nav target is unambiguous. - DocumentDetail Interest link sub-text now shows the derived `berthLabel` (formatBerthRange of the in-EOI-bundle subset, falling back to primary, then all linked berths). The link no longer duplicates the Client name; falls back to clientName or "No berths linked" when no berths exist. - New /<port>/residential/page.tsx redirects to /residential/clients so the breadcrumb's Residential link works. - Residential interests list — whole row is now a Link target (was hidden behind a trailing "View" link); hover + border accent on the full row. - Expenses PageHeader description "Track and manage port expenses" → "Track and manage business expenses" (drop the redundant "port", same audit pattern flagged in the queue). - DropdownMenu base content capped at `max-h-96` (was the Radix available-height variable, which stretched menus edge-to-edge); the existing internal scroll handles overflow. - Yacht Overview Notes block: replaced the legacy single-field textarea with the threaded `<NotesList entityType="yachts">` for parity with clients/interests/companies. Legacy `yacht.notes` column stays in schema for EOI/contract merge-field path. tsc clean. 1419/1419 vitest pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,7 +88,15 @@ function EditableRow({ label, children }: { label: string; children: React.React
|
||||
);
|
||||
}
|
||||
|
||||
function OverviewTab({ yachtId, yacht }: { yachtId: string; yacht: YachtTabsYacht }) {
|
||||
function OverviewTab({
|
||||
yachtId,
|
||||
yacht,
|
||||
currentUserId,
|
||||
}: {
|
||||
yachtId: string;
|
||||
yacht: YachtTabsYacht;
|
||||
currentUserId?: string;
|
||||
}) {
|
||||
const mutation = useYachtPatch(yachtId);
|
||||
const save =
|
||||
(field: YachtPatchField, transform?: (v: string | null) => string | number | null) =>
|
||||
@@ -224,14 +232,17 @@ function OverviewTab({ yachtId, yacht }: { yachtId: string; yacht: YachtTabsYach
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{/* Notes */}
|
||||
{/* Notes — threaded list (parity with clients/interests/companies).
|
||||
The legacy single-field `yacht.notes` column stays in schema
|
||||
for the EOI/contract merge-field path; OverviewTab no longer
|
||||
exposes it for editing here. */}
|
||||
<div className="space-y-1 md:col-span-2">
|
||||
<h3 className="text-sm font-medium mb-2">Notes</h3>
|
||||
<InlineEditableField
|
||||
variant="textarea"
|
||||
value={yacht.notes}
|
||||
onSave={save('notes')}
|
||||
emptyText="No notes - click to add"
|
||||
<NotesList
|
||||
entityType="yachts"
|
||||
entityId={yachtId}
|
||||
currentUserId={currentUserId}
|
||||
parentInvalidateKey={['yachts', yachtId]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -327,7 +338,7 @@ export function getYachtTabs({ yachtId, currentUserId, yacht }: YachtTabsOptions
|
||||
{
|
||||
id: 'overview',
|
||||
label: 'Overview',
|
||||
content: <OverviewTab yachtId={yachtId} yacht={yacht} />,
|
||||
content: <OverviewTab yachtId={yachtId} yacht={yacht} currentUserId={currentUserId} />,
|
||||
},
|
||||
{
|
||||
id: 'ownership-history',
|
||||
|
||||
Reference in New Issue
Block a user