Files
MOPC-Portal/src/app/(admin)/admin/logistics/page.tsx
Matt eb19cb11a1 chore: drop dead Logistics tabs + move visa toggle to settings
- Remove the Documents tab — visa documents are out of scope for this
  edition and there is no other concrete document need.
- Remove the Logistics > Settings disabled tab — every per-edition
  configuration knob now lives at /admin/settings > Edition.
- Replace the inline "Visible to teams" toggle on the Visas tab with a
  small "Edition settings" button that links straight to the
  consolidated settings page. The toggle itself moved to that page in
  the previous commit.
- Drop the now-unused getVisaVisibility / setVisaVisibility wiring
  inside VisasTab. (The procedures still exist server-side; the new
  Edition tab uses program.updateEditionSettings instead.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 20:09:50 +02:00

81 lines
2.7 KiB
TypeScript

'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'
import { VisasTab } from '@/components/admin/logistics/visas-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="h-auto w-full justify-start overflow-x-auto pb-2">
<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">
<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>
<TabsContent value="visas">
<VisasTab programId={programId} />
</TabsContent>
</Tabs>
</div>
)
}