-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Summary
Add a dedicated super admin section to the admin sidebar that only renders for users with the super_admin role. This groups super admin navigation links into a clearly labeled section, separate from the existing Applicants and Event sections.
Current State
The sidebar (client/web/src/pages/admin/_shared/AppSidebar.tsx) currently has:
- Header:
NavUsercomponent (avatar, name, email, dropdown) - Content: Two
NavSectioncomponents — "Applicants" and "Event" - Footer: A conditional Settings button that already checks
user?.role === 'super_admin'
The Settings button in the footer opens a SettingsDialog modal — this should be moved into the new super admin nav section as a proper navigation link (or kept as-is, depending on preference).
Implementation Details
Files to modify
| File | Change |
|---|---|
client/web/src/pages/admin/_shared/AppSidebar.tsx |
Add conditional NavSection for super admin links |
What to add
Define a superAdminNav items array and conditionally render it after the Event section:
const superAdminNav = [
{ name: 'Dashboard', url: '/superadmin', icon: LayoutDashboard },
{ name: 'Settings', url: '/superadmin/settings', icon: Settings },
// Future: Set Admin, Email Applicants, etc.
]{/* Inside SidebarContent, after the Event NavSection */}
{user?.role === 'super_admin' && (
<NavSection
label="Super Admin"
items={superAdminNav}
currentPath={location.pathname}
/>
)}Existing patterns to follow
- Role access:
const { user } = useUserStore()→user?.role === 'super_admin' - NavSection pattern: Reuse the existing
NavSectioncomponent which takeslabel,items[](name, url, icon), andcurrentPath - Icons: Import from
lucide-react(already used throughout the sidebar) - Route guards: Super admin pages are already wrapped with
<RequireSuperAdmin>inroutes.tsx
Acceptance Criteria
- New "Super Admin"
NavSectionadded to sidebar content - Section only renders when
user?.role === 'super_admin' - At least one navigation link (Decisions →
/decisions) - Follows existing
NavSectioncomponent pattern
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers