From 8ef0b55785963dfa3f3371fab2c0738e3e384f9c Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 7 Aug 2026 05:33:58 +0000 Subject: [PATCH] Modified by www.SourceFiles.app --- src/routes/_authenticated/route.tsx | 83 +++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 16 deletions(-) diff --git a/src/routes/_authenticated/route.tsx b/src/routes/_authenticated/route.tsx index c43a908..b2484f0 100644 --- a/src/routes/_authenticated/route.tsx +++ b/src/routes/_authenticated/route.tsx @@ -3,8 +3,22 @@ import { useAuth, highestRole } from "@/hooks/use-auth"; import { supabase } from "@/integrations/supabase/client"; import { Button } from "@/components/ui/button"; import { - GraduationCap, LayoutDashboard, Users, ClipboardCheck, Receipt, - MessageSquare, FileText, CalendarDays, Settings, LogOut, Loader2, BookOpen, ClipboardList, Printer, Mail + GraduationCap, + LayoutDashboard, + Users, + ClipboardCheck, + Receipt, + MessageSquare, + FileText, + CalendarDays, + Settings, + LogOut, + Loader2, + BookOpen, + ClipboardList, + Printer, + Mail, + CreditCard, } from "lucide-react"; import { useEffect } from "react"; @@ -23,7 +37,11 @@ function ProtectedLayout() { }, [loading, user, navigate]); if (loading || !user) { - return
; + return ( +
+ +
+ ); } const role = highestRole(roles); @@ -32,11 +50,32 @@ function ProtectedLayout() { const nav = [ { to: "/dashboard", label: "Dashboard", icon: LayoutDashboard, show: true }, { to: "/students", label: "Students", icon: Users, show: true }, - { to: "/classes", label: "Classes", icon: BookOpen, show: isAdmin || roles.includes("teacher") }, - { to: "/attendance", label: "Attendance", icon: ClipboardCheck, show: isAdmin || roles.includes("teacher") }, - { to: "/plans", label: "504 / IEP", icon: ClipboardList, show: isAdmin || roles.includes("teacher") }, + { + to: "/classes", + label: "Classes", + icon: BookOpen, + show: isAdmin || roles.includes("teacher"), + }, + { + to: "/attendance", + label: "Attendance", + icon: ClipboardCheck, + show: isAdmin || roles.includes("teacher"), + }, + { + to: "/plans", + label: "504 / IEP", + icon: ClipboardList, + show: isAdmin || roles.includes("teacher"), + }, { to: "/reports", label: "Reports", icon: Printer, show: isAdmin || roles.includes("teacher") }, { to: "/ledger", label: "Tuition", icon: Receipt, show: true }, + { + to: "/billing", + label: "Billing", + icon: CreditCard, + show: isAdmin || roles.includes("billing_admin"), + }, { to: "/messages", label: "Messages", icon: MessageSquare, show: true }, { to: "/mail", label: "Mail", icon: Mail, show: isAdmin || roles.includes("teacher") }, { to: "/forms", label: "Forms", icon: FileText, show: true }, @@ -56,23 +95,35 @@ function ProtectedLayout() { Bayside Academy
-
{user.email}
{role ?? "no role"}
+
+ {user.email} +
+ {role ?? "no role"} +
-
+
+ +
); }