feat: logistics page shell + Confirmations/Travel/Hotels tabs

- /admin/logistics page with shadcn Tabs (3 active + 5 disabled "(soon)"
  placeholder tabs for Visas / Lunch / Documents / Email Templates / Settings).
- Sidebar entry "Logistics" between Mentors and Awards (Plane icon).
- Confirmations tab: read-only table with status filter pills, browser-
  local-time deadline display, attendee count, decline reason snippet.
- Hotels tab: single-hotel form (name/address/link/notes) with live
  email-preview card showing what teams will see.
- Travel tab: per-attendee flight tracker with arrival/departure
  datetimes, flight numbers, IATA airports, click-to-toggle status badge,
  edit Sheet, and unfilled/pending/confirmed filter pills.

Smoke-tested end-to-end: navigation, sidebar entry, all three tabs
render, hotel save persists to DB and renders in preview card.
This commit is contained in:
Matt
2026-04-28 18:25:29 +02:00
parent d1f29a149a
commit 57ec28edad
5 changed files with 887 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
'use client'
import { useState } from 'react'
import { useEdition } from '@/contexts/edition-context'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import {
CheckCircle2,
FileText,
Hotel as HotelIcon,
Plane,
Salad,
ScrollText,
Settings,
Stamp,
} from 'lucide-react'
import { ConfirmationsTab } from '@/components/admin/logistics/confirmations-tab'
import { TravelTab } from '@/components/admin/logistics/travel-tab'
import { HotelsTab } from '@/components/admin/logistics/hotels-tab'
export default function LogisticsPage() {
const { currentEdition } = useEdition()
const [tab, setTab] = useState('confirmations')
if (!currentEdition) {
return (
<p className="text-muted-foreground py-12 text-center text-sm">
Select an edition to view logistics.
</p>
)
}
const programId = currentEdition.id
return (
<div className="space-y-6">
<div>
<h1 className="text-2xl font-semibold tracking-tight">Logistics</h1>
<p className="text-muted-foreground">
Operational hub for the grand finale: confirmations, travel, hotels, and more.
</p>
</div>
<Tabs value={tab} onValueChange={setTab} className="space-y-6">
<TabsList className="flex-wrap">
<TabsTrigger value="confirmations">
<CheckCircle2 className="mr-2 h-4 w-4" /> Confirmations
</TabsTrigger>
<TabsTrigger value="travel">
<Plane className="mr-2 h-4 w-4" /> Travel
</TabsTrigger>
<TabsTrigger value="hotels">
<HotelIcon className="mr-2 h-4 w-4" /> Hotels
</TabsTrigger>
<TabsTrigger value="visas" disabled>
<Stamp className="mr-2 h-4 w-4" /> Visas
<span className="text-muted-foreground ml-1 text-xs">(soon)</span>
</TabsTrigger>
<TabsTrigger value="lunch" disabled>
<Salad className="mr-2 h-4 w-4" /> Lunch
<span className="text-muted-foreground ml-1 text-xs">(soon)</span>
</TabsTrigger>
<TabsTrigger value="documents" disabled>
<FileText className="mr-2 h-4 w-4" /> Documents
<span className="text-muted-foreground ml-1 text-xs">(soon)</span>
</TabsTrigger>
<TabsTrigger value="email-templates" disabled>
<ScrollText className="mr-2 h-4 w-4" /> Email Templates
<span className="text-muted-foreground ml-1 text-xs">(soon)</span>
</TabsTrigger>
<TabsTrigger value="settings" disabled>
<Settings className="mr-2 h-4 w-4" /> Settings
<span className="text-muted-foreground ml-1 text-xs">(soon)</span>
</TabsTrigger>
</TabsList>
<TabsContent value="confirmations">
<ConfirmationsTab programId={programId} />
</TabsContent>
<TabsContent value="travel">
<TravelTab programId={programId} />
</TabsContent>
<TabsContent value="hotels">
<HotelsTab programId={programId} />
</TabsContent>
</Tabs>
</div>
)
}