From 9ddf91491d8b02370bd08f98fd8bd23fc82e08b4 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 22 Aug 2026 23:10:18 +0000 Subject: [PATCH] Terminal --- src/routes/_authenticated/classes.$id.tsx | 46 ----------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/routes/_authenticated/classes.$id.tsx diff --git a/src/routes/_authenticated/classes.$id.tsx b/src/routes/_authenticated/classes.$id.tsx deleted file mode 100644 index 7f20572..0000000 --- a/src/routes/_authenticated/classes.$id.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { createFileRoute, Link } from "@tanstack/react-router"; -import { useQuery } from "@tanstack/react-query"; -import { supabase } from "@/integrations/supabase/client"; -import { useAuth } from "@/hooks/use-auth"; -import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; -import { ArrowLeft, Lock, Loader2 } from "lucide-react"; -import { RosterManager, GradebookGrid, GradingConfigEditor } from "@/components/gradebook"; - -export const Route = createFileRoute("/_authenticated/classes/$id")({ - head: () => ({ meta: [{ title: "Class — School Portal" }] }), - component: ClassDetail, -}); - -function ClassDetail() { - const { id } = Route.useParams(); - const { user, roles } = useAuth(); - const isAdmin = roles.includes("admin"); - - const { data: cls, isLoading } = useQuery({ - queryKey: ["class", id], - queryFn: async () => (await supabase.from("classes").select("*").eq("id", id).single()).data, - }); - const isTeacher = !!cls && cls.teacher_id === user?.id; - const canEdit = isAdmin || isTeacher; - - if (isLoading) return
; - if (!canEdit) return

Not available

You don't have access to this class.

; - - return ( -
- All classes -

{cls?.name}

- - - - Gradebook - Roster - Grading setup - - - - - -
- ); -}