Skip to content

feature - add admin-only analytics dashboard with mock first api hook#138

Open
Saritahimthani wants to merge 1 commit into
YSTEMandChess:mainfrom
Saritahimthani:feature/analytics-frontend
Open

feature - add admin-only analytics dashboard with mock first api hook#138
Saritahimthani wants to merge 1 commit into
YSTEMandChess:mainfrom
Saritahimthani:feature/analytics-frontend

Conversation

@Saritahimthani
Copy link
Copy Markdown
Contributor

  • Add AnalyticsLayout page at Pages/Analytics with Individual/Zipcode/Global
    tabs and a start/end date range filter
  • Add useAnalyticsApi hook at core/hooks that reads JWT from cookies and
    returns { data, loading, error }; mock-first via USE_MOCK toggle so UI
    work is not blocked on the backend endpoint
  • Add AdminRoute guard in AppRoutes that resolves the role via
    SetPermissionLevel and redirects non-admins to /login
  • Wire /analytics behind the guard
  • Add Jest tests for the hook and the layout

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant