Skip to content

feat: add chapter status admin page#2671

Open
mroderick wants to merge 1 commit into
masterfrom
feature/chapter-status
Open

feat: add chapter status admin page#2671
mroderick wants to merge 1 commit into
masterfrom
feature/chapter-status

Conversation

@mroderick

@mroderick mroderick commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

After the organisers meeting today, Charlene and I discussed the option to have an overview in the admin section to be able to see which chapters are or might soon become dormant.

Hence this PR.

What

New admin page at /admin/chapters/status showing chapter activity status.

Chapters are grouped into three lists:

  • Active — at least 1 workshop in the period (past 6/12 months, including 3 months ahead)
  • Dormant — 0 workshops but the chapter is enabled
  • Inactive — chapter is disabled

Each row shows the chapter name, workshop count, and eligible students/coaches (not banned, accepted TOC, subscribed).

Active chapters with no workshops in the last n-1 months get an At Risk badge.

A toggle switches between 6-month and 12-month windows.

Screenshot from local development environment.

image

Implementation

  • New route GET /admin/chapters/status
  • Controller action with two aggregate queries (workshop dates per chapter, eligible member counts by role), classification in Ruby
  • Admin::ChapterStatus::TableComponent (ViewComponent) for each status table, with collapsible explanation via <details>
  • Months toggle as a button group (button_tag with matching data-disable-with)
  • Portal nav link added to admin dashboard

Seeding

Three extra chapters added to db/seeds.rb for the development environment:

  • Bournemouth (inactive)
  • South London (dormant)
  • Edinburgh (at-risk)

Admin page at /admin/chapters/status showing which chapters are
active, dormant, or inactive over a configurable 6 or 12 month
window. Each chapter shows workshop count and eligible member
counts (not banned, accepted terms, subscribed) per role.

Active chapters running no workshops in the last n-1 months are
flagged At Risk. The window includes future workshops (3 months
ahead) so chapters with upcoming events stay classified as active.

Uses ERB + ViewComponent.

Also seeds demo chapters for the three status categories:
Bournemouth (inactive), South London (dormant),
Edinburgh (at-risk).
@mroderick mroderick marked this pull request as ready for review June 25, 2026 17:31
@KimberleyCook

KimberleyCook commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Is this for everyone/chapter organisers to see or just super admins?

@mroderick

Copy link
Copy Markdown
Collaborator Author

Is this for everyone/chapter organisers to see or just super admins?

Currently it is not restricted, but the page is only linked from the admin dashboard, so you'll have to know the url to see it.

The page is really just for you and Charlene to get a quick health check on chapters.


I'd like to rethink the admin section, but for that I'll need to sit down and learn everything it does and for whom. So that's another future project.

I imagine that once we get into that, this page will likely go away again or be incorporated into something else.

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.

2 participants