Skip to content

WIP - Add admin dashboard summary and top-category UI#5

Open
OSPFNeighbour wants to merge 1 commit into
mainfrom
wip-admin-dash
Open

WIP - Add admin dashboard summary and top-category UI#5
OSPFNeighbour wants to merge 1 commit into
mainfrom
wip-admin-dash

Conversation

@OSPFNeighbour

Copy link
Copy Markdown
Collaborator

This pull request introduces a comprehensive dashboard summary for locations, providing an at-a-glance overview of member activity, engagement, and kiosk status over recent periods. It adds new GraphQL types and resolvers to supply this data and implements a new admin dashboard UI to visualize the metrics and trends.

Screenshot 2026-07-02 at 12 20 24 pm

API and GraphQL enhancements:

  • Added new GraphQL types (DashboardCategoryPeriodSummary, DashboardDailyPeriodSummary, LocationDashboardSummary) and a dashboardSummary field to the Location type, exposing summary statistics and trends for use in the admin dashboard. [1] [2]
  • Implemented the backend logic in Rust to compute and aggregate dashboard metrics (e.g., active members, check-ins, kiosk status, activity durations, daily and category breakdowns) for the past 7 and 30 days, including efficient bucketing and sorting. [1] [2]
  • Introduced constants for time windows (e.g., 7 days, 30 days, 24 hours) and session online status to support the dashboard calculations.

Admin dashboard UI:

  • Built a new dashboard interface in AdminHome.tsx that queries and displays the summary data, including member engagement stats, kiosk status, activity trends by day and by category, and quick insights. The UI includes bar charts, summary cards, and formatted metrics for clarity.
  • Added helper functions for formatting dates, durations, and percentages to improve the readability of dashboard statistics.

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