Skip to content

Move SuperadminDashboard out of RoleDashboards.tsx #143

Closed

Description

@jgupta05072003-code

What this is for

RoleDashboards.tsx is a 3,100+ line file holding all 8 role dashboards. We're moving each one into its own file so the codebase is easier to navigate. This is the biggest and most complex dashboard — do this one last, after a couple of the smaller ones from #136 feel familiar.

What to move

export const SuperadminDashboard (~694 lines) — the dashboard shown to Superadmin-role users.

Steps

  1. Create frontend/src/components/dashboards/SuperadminDashboard.tsx.
  2. Cut the SuperadminDashboard component out of RoleDashboards.tsx into the new file, with whatever imports it needs.
  3. Back in RoleDashboards.tsx, add: export { SuperadminDashboard } from './dashboards/SuperadminDashboard'; where it used to be.
  4. Don't change any logic or JSX — copy it exactly as-is.

Watch out for

  • This dashboard is the most complex one — it likely uses RegionalAnalyticsView and/or FLNLevelReferenceModal (see Epic: split RoleDashboards.tsx into one file per dashboard #136's other sub-issues). If those have already been moved by the time you start, just import them from their new location instead of RoleDashboards.tsx.

How to check your work

  1. cd frontend && npm run lint — no errors.
  2. npm run build — succeeds.
  3. Run npm run dev, log in as Superadmin, and click through every section — confirm everything renders and works exactly the same as before.

Part of #136.

Activity

  1. vanshikaagrawalcsaiml24 commented on Aug 20, 2026

    @vanshikaagrawalcsaiml24
    Contributor

    i would like to work on this....i was working on issue #172 but it already got resolved from your side ..so assign me this i will get it done @jgupta05072003-code

  2. vanshikaagrawalcsaiml24 commented on Aug 20, 2026

    @vanshikaagrawalcsaiml24
    Contributor

    Kindly assign me this issue mam @jgupta05072003-code

  3. jgupta05072003-code commented on Aug 21, 2026

    @jgupta05072003-code
    CollaboratorAuthor

    Resolved by PR #255 (merged). Verified independently: cherry-picked #255's commit onto the clean pre-#250 main (e778d58) in an isolated worktree — tsc --noEmit and vite build both pass clean. SuperadminDashboard extracted faithfully (664 lines in original block → 676 in new file, difference is added imports), duplicate DashboardProps interface across RoleDashboards/TeacherDashboard/VolunteerDashboard correctly consolidated into a single definition in types.ts. No logic changes, no regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededintern-readyMechanical, well-scoped — safe for interns to pick up now

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions