feat: lunch tab scaffold + un-disable trigger
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ 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'
|
||||
import { LunchTab } from '@/components/admin/logistics/lunch-tab'
|
||||
|
||||
export default function LogisticsPage() {
|
||||
const { currentEdition } = useEdition()
|
||||
@@ -52,9 +53,8 @@ export default function LogisticsPage() {
|
||||
<TabsTrigger value="visas">
|
||||
<Stamp className="mr-2 h-4 w-4" /> Visas
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="lunch" disabled>
|
||||
<TabsTrigger value="lunch">
|
||||
<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
|
||||
@@ -74,6 +74,9 @@ export default function LogisticsPage() {
|
||||
<TabsContent value="visas">
|
||||
<VisasTab programId={programId} />
|
||||
</TabsContent>
|
||||
<TabsContent value="lunch">
|
||||
<LunchTab programId={programId} />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
)
|
||||
|
||||
35
src/components/admin/logistics/lunch-tab.tsx
Normal file
35
src/components/admin/logistics/lunch-tab.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
'use client'
|
||||
|
||||
import { trpc } from '@/lib/trpc/client'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
|
||||
export function LunchTab({ programId }: { programId: string }) {
|
||||
const { data: event, isLoading } = trpc.lunch.getEvent.useQuery({ programId })
|
||||
if (isLoading || !event) {
|
||||
return <Skeleton className="h-48 w-full" />
|
||||
}
|
||||
if (!event.enabled) {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Lunch is disabled</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="text-muted-foreground text-sm">
|
||||
Toggle Lunch on from the Event configuration card to begin setup.
|
||||
</p>
|
||||
{/* Event config card mounts in Task 14, replacing this stub. */}
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{/* Cards mount in Tasks 14-18. */}
|
||||
<p className="text-muted-foreground text-sm">
|
||||
Lunch tab — cards land in upcoming tasks.
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user