fix(audit): replace 'coming soon' tab stubs (H7 + R2-M5)

H7: Three tabs were rendering "coming soon" placeholders to every user
on every detail page:
- Client Files: now uses ClientFilesTab (already existed) which renders
  the FileGrid + upload zone via /api/v1/files?clientId=...
- Client Reservations: split into Active / History sections; History
  lazy-loads ended + cancelled reservations on demand from
  /api/v1/berth-reservations?clientId=&status=
- Berth Waiting List + Maintenance Log: removed from buildBerthTabs
  until the underlying surfaces ship (schema tables exist; UIs don't)

R2-M5: Company Documents tab was a "Coming soon" EmptyState. Removed
from buildCompanyTabs until /api/v1/files accepts a companyId filter
(schema supports it, validator doesn't).

1175/1175 vitest passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Ciaccio
2026-05-06 22:21:23 +02:00
parent 5fc68a5f34
commit 59b9e8f177
4 changed files with 86 additions and 41 deletions

View File

@@ -321,14 +321,6 @@ function OverviewTab({ berth }: { berth: BerthData }) {
);
}
function StubTab({ label }: { label: string }) {
return (
<div className="flex flex-col items-center justify-center rounded-lg border border-dashed p-12 text-center">
<p className="text-muted-foreground">{label} coming soon</p>
</div>
);
}
export function buildBerthTabs(berth: BerthData): DetailTab[] {
return [
{
@@ -351,16 +343,9 @@ export function buildBerthTabs(berth: BerthData): DetailTab[] {
label: 'Documents',
content: <BerthDocumentsTab berthId={berth.id} />,
},
{
id: 'waiting-list',
label: 'Waiting List',
content: <StubTab label="Waiting List" />,
},
{
id: 'maintenance',
label: 'Maintenance Log',
content: <StubTab label="Maintenance Log" />,
},
// 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.
{
id: 'activity',
label: 'Activity',