feat: add chapter status admin page#2671
Open
mroderick wants to merge 1 commit into
Open
Conversation
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).
Contributor
|
Is this for everyone/chapter organisers to see or just super admins? |
Collaborator
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/statusshowing chapter activity status.Chapters are grouped into three lists:
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.
Implementation
GET /admin/chapters/statusAdmin::ChapterStatus::TableComponent(ViewComponent) for each status table, with collapsible explanation via<details>button_tagwith matchingdata-disable-with)Seeding
Three extra chapters added to
db/seeds.rbfor the development environment: