feat(berths): split Documents tab into Spec + Deal Documents
Berth detail page now has two tabs:
- Spec: the existing versioned berth-spec PDF surface (current panel,
version history, parser badge).
- Deal Documents: NEW. Lists EOIs / contracts / etc. attached to
interests currently linked to this berth via interest_berths.
New service helper listDealDocumentsForBerth joins documents →
interests → interest_berths with a port_id guard on both sides.
GET /api/v1/berths/[id]/deal-documents wraps it, gated on berths.view.
Read-only — title, type, status badge, and an Open link to the source
interest page. Edits / sends still happen on the interest's own page.
The Spec tab paragraph now points reps to the new Deal Documents tab
instead of telling them to navigate via Interests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import { BerthReservationsTab } from './berth-reservations-tab';
|
||||
import { BerthInterestsTab } from './berth-interests-tab';
|
||||
import { BerthInterestPulse } from './berth-interest-pulse';
|
||||
import { BerthDocumentsTab } from './berth-documents-tab';
|
||||
import { BerthDealDocumentsTab } from './berth-deal-documents-tab';
|
||||
|
||||
type BerthData = {
|
||||
id: string;
|
||||
@@ -413,10 +414,15 @@ export function buildBerthTabs(berth: BerthData): DetailTab[] {
|
||||
content: <BerthReservationsTab berthId={berth.id} />,
|
||||
},
|
||||
{
|
||||
id: 'documents',
|
||||
label: 'Documents',
|
||||
id: 'spec',
|
||||
label: 'Spec',
|
||||
content: <BerthDocumentsTab berthId={berth.id} />,
|
||||
},
|
||||
{
|
||||
id: 'deal-documents',
|
||||
label: 'Deal Documents',
|
||||
content: <BerthDealDocumentsTab berthId={berth.id} />,
|
||||
},
|
||||
// Waiting List + Maintenance Log tabs were stubs ("coming soon")
|
||||
// visible to every operator. Hidden here until the
|
||||
// berth_waiting_list / berth_maintenance_log feature surfaces ship.
|
||||
|
||||
Reference in New Issue
Block a user