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.
2026-04-28 18:25:29 +02:00
|
|
|
'use client'
|
|
|
|
|
|
|
|
|
|
import { useState } from 'react'
|
|
|
|
|
import { useEdition } from '@/contexts/edition-context'
|
|
|
|
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
|
|
|
|
|
import {
|
|
|
|
|
CheckCircle2,
|
|
|
|
|
Hotel as HotelIcon,
|
|
|
|
|
Plane,
|
|
|
|
|
Salad,
|
|
|
|
|
ScrollText,
|
|
|
|
|
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'
|
2026-04-28 19:37:55 +02:00
|
|
|
import { VisasTab } from '@/components/admin/logistics/visas-tab'
|
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.
2026-04-28 18:25:29 +02:00
|
|
|
|
|
|
|
|
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">
|
2026-04-28 19:45:52 +02:00
|
|
|
<TabsList className="h-auto w-full justify-start overflow-x-auto pb-2">
|
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.
2026-04-28 18:25:29 +02:00
|
|
|
<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>
|
2026-04-28 19:37:55 +02:00
|
|
|
<TabsTrigger value="visas">
|
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.
2026-04-28 18:25:29 +02:00
|
|
|
<Stamp className="mr-2 h-4 w-4" /> Visas
|
|
|
|
|
</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="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>
|
|
|
|
|
</TabsList>
|
|
|
|
|
|
|
|
|
|
<TabsContent value="confirmations">
|
|
|
|
|
<ConfirmationsTab programId={programId} />
|
|
|
|
|
</TabsContent>
|
|
|
|
|
<TabsContent value="travel">
|
|
|
|
|
<TravelTab programId={programId} />
|
|
|
|
|
</TabsContent>
|
|
|
|
|
<TabsContent value="hotels">
|
|
|
|
|
<HotelsTab programId={programId} />
|
|
|
|
|
</TabsContent>
|
2026-04-28 19:37:55 +02:00
|
|
|
<TabsContent value="visas">
|
|
|
|
|
<VisasTab programId={programId} />
|
|
|
|
|
</TabsContent>
|
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.
2026-04-28 18:25:29 +02:00
|
|
|
</Tabs>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|