From eb19cb11a15874581b78cb84392fedec5f3a210e Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 28 Apr 2026 20:09:50 +0200 Subject: [PATCH] chore: drop dead Logistics tabs + move visa toggle to settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- src/app/(admin)/admin/logistics/page.tsx | 10 ------ src/components/admin/logistics/visas-tab.tsx | 35 +++++--------------- 2 files changed, 8 insertions(+), 37 deletions(-) diff --git a/src/app/(admin)/admin/logistics/page.tsx b/src/app/(admin)/admin/logistics/page.tsx index 24ca1b4..8962427 100644 --- a/src/app/(admin)/admin/logistics/page.tsx +++ b/src/app/(admin)/admin/logistics/page.tsx @@ -5,12 +5,10 @@ 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' @@ -58,18 +56,10 @@ export default function LogisticsPage() { Lunch (soon) - - Documents - (soon) - Email Templates (soon) - - Settings - (soon) - diff --git a/src/components/admin/logistics/visas-tab.tsx b/src/components/admin/logistics/visas-tab.tsx index 5d9d0e3..97744cc 100644 --- a/src/components/admin/logistics/visas-tab.tsx +++ b/src/components/admin/logistics/visas-tab.tsx @@ -1,12 +1,11 @@ 'use client' +import Link from 'next/link' import { useMemo, useState } from 'react' import { trpc } from '@/lib/trpc/client' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' -import { Switch } from '@/components/ui/switch' -import { Label } from '@/components/ui/label' import { Skeleton } from '@/components/ui/skeleton' import { Table, @@ -16,8 +15,7 @@ import { TableHeader, TableRow, } from '@/components/ui/table' -import { toast } from 'sonner' -import { ShieldOff } from 'lucide-react' +import { Settings as SettingsIcon, ShieldOff } from 'lucide-react' import { VisaEditDialog, type VisaEditTarget } from './visa-edit-dialog' import type { VisaStatus } from '@prisma/client' @@ -65,16 +63,6 @@ export function VisasTab({ programId }: Props) { const { data, isLoading } = trpc.logistics.listVisaApplications.useQuery({ programId }) - const utils = trpc.useUtils() - const { data: visibility } = trpc.logistics.getVisaVisibility.useQuery({ programId }) - const setVisibility = trpc.logistics.setVisaVisibility.useMutation({ - onSuccess: () => { - utils.logistics.getVisaVisibility.invalidate({ programId }) - toast.success('Visibility updated') - }, - onError: (e) => toast.error(e.message), - }) - const filtered = useMemo(() => { if (!data) return [] return statusFilter === 'all' @@ -129,19 +117,12 @@ export function VisasTab({ programId }: Props) { continue to flow over email and are never stored on this platform.

-
- - setVisibility.mutate({ programId, visible: v }) - } - disabled={setVisibility.isPending} - /> - -
+