Add scholarships statistics report + shared filters - #2053
Merged
Conversation
maebeale
commented
Aug 2, 2026
| # nil year that sorts last. | ||
| def years | ||
| @years ||= @events | ||
| .group_by { |event| event.start_date&.year } |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: Grouping is by calendar year (matches EventRevenueReport). If a training cycle (Nov → Mar → Jul) should read as one program/school year instead, this is the line to change.
maebeale
force-pushed
the
maebeale/shareable-report-partial
branch
from
August 4, 2026 05:55
cf582f1 to
c0c59b1
Compare
Turns the manually-maintained per-training summary spreadsheet into a reusable partial: scholarship dollars and award counts (funded vs unfunded) plus trainee counts, one column per facilitator training, grouped by year. Trainee counts split into "2-Day" (scheduled) vs "On-Demand" totals via a new event.on_demand flag. Rendered on the cross-event revenue page and a new standalone, shareable report page (/events/facilitator_training_report). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
force-pushed
the
maebeale/shareable-report-partial
branch
from
August 4, 2026 05:56
c0c59b1 to
443cef5
Compare
Makes scholarships a third statistics report alongside revenue and participation (linked from the hub as a summary card), instead of a facilitator-training report embedded in the hub: - Report per facilitator training, grouped by year, with the shared time-period + event filters plus an abbreviation substring search. - Counts scholarship $ and # (awards), funded vs unfunded, and attended trainees split Training (scheduled) vs On-demand. - Funded/unfunded now treats a grant the org donated to itself (AWBW, via new Organization.awbw) as unfunded/subsidy — applied app-wide in EventDashboard and EventRevenueFigures, so revenue agrees. - Drops the unused on_demand/scheduled scopes (kept the column + flag). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Brand the scholarships report to the fuchsia domain theme (icon + label per section) instead of ad-hoc rose/amber/yellow; wrap long training titles to two lines then truncate. - Scholarships index: move Status left of Training; make the whole recipient row navigate to the scholarship edit page (clickable-row Stimulus controller), keeping the name link for keyboard access. - Edit-page header: render the recipient as a profile button. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add the same report filters (time period, training, abbreviation) to the /scholarships index, plus a new funder filter on both the index and the events scholarship report, via a remote-select over people/orgs and a shared _report_filters partial. - Surface the scholarship summary (KPI strip, extracted to a partial) at the top of /scholarships. - Funder scoping runs through the data: Scholarship.from_funder/for_events scopes, an EventDashboard scholarship_donor: option, and a funder-aware EventScholarshipReport, so both the list and the report reflect it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the clickable-row Stimulus controller with a no-JS stretched link: the row is the positioned ancestor and the recipient link's ::before covers it, so clicking anywhere follows that one link. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The clickable-row idiom in _payment_history / link_organization uses after:absolute after:inset-0; align the scholarship row to it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The three-stacked-table layout repeated the event columns for every metric,
which was hard to read. Rework into one row per facilitator training so the
figures scan left-to-right, and make the report reshape to the task:
- One card for the whole report; years become subheader/subtotal rows (with an
all-time total) instead of a separate card each, so "All time" reads as a
single table. Card title switches to "All facilitator trainings" for all-time.
- A layout toggle (?view=) swaps separate #/$ columns for combined count-over-
dollars cells, server-driven so the choice is shareable.
- All-time no longer pins the KPI headline to the current year — it aggregates
every training ("All trainings").
- "Registrants attended" (was "Attended") clarifies it counts all attendees, not
just recipients; the per-training numbers link into the registrants roster
(attended filter), with a matching eyebrow back to the report.
- One "Event search" box matches abbreviation OR title (was abbreviation-only).
- Statistics + revenue/participation/scholarships pages widened to match the
event manage pages.
- Seed prior-year trainings so the year grouping and all-time have real data.
- Document the table view-toggle patterns (segmented nav + sliders) in .impeccable.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-ups on the scholarships report:
- The per-training "Registrants attended" numbers now open the registrants
roster in the same tab (attended filter) and the roster's eyebrow returns to
the exact report row — scrolled to and highlighted — with the report's
filters/toggle restored (registrants-style, via new EventsHelper paths).
- Revenue and Participation reports now aggregate every year on "All time"
("All events") instead of pinning the KPI headline to the current year,
matching the scholarships fix.
- Recipients page gains a "Statistics" link-button next to Grants → the
scholarships report.
- Statistics-hub revenue Net card: inline the fees/scholarships/subsidy
breakdown on the total row so the card stays three rows.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The amount-laden breakdown wrapped onto a third row, making the Net card taller than its siblings. Replace it with a two-line formula (fees + scholarships, funded added / unfunded subtracted) that stays within three rows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
🤖 suggested review level: 5 Inspect 🔬 new scholarship statistics report + service, app-wide funded/unfunded rule change (affects revenue), all-time headline change across all three reports, shared report filters incl. funder remote-select across two pages, migration, and Stimulus
Goal
Add a Scholarships statistics report (sibling to Revenue and Participation) and thread scholarship reporting/filters through the existing
/scholarshipsindex.What it does
/events/scholarships(admin, linked from the statistics hub): one card, one row per facilitator training. When several years are in scope they become per-year subheader/subtotal rows ending in an all-time total; selecting All time titles the card "All facilitator trainings". Columns: Registrants attended and funded/unfunded/total for # of awards and $. A?view=toggle swaps the separate #/$ columns for combined count-over-dollars cells. Fuchsia-branded.EventsHelperpaths).Organization.awbw) — applied inEventDashboard+EventRevenueFigures, so revenue agrees./scholarshipsindex: gains the shared report filters (time period, training, event search) plus a funder filter (remote-select over people/orgs), a scholarship KPI strip, Status moved left of Training, and whole-row click → edit._report_filters+ funder filter across both pages; one Event search box matches abbreviation or title.Notes for reviewers
.impeccable.mddocuments the table view-toggle patterns (segmented nav + sliders).Tests
Report services (funder + AWBW scoping, all-time featured aggregate across all three reports),
EventDashboard/EventRevenueFiguresfunded/unfunded,Organization.awbw,Scholarshipscopes, requests (both pages incl. funder/search filters, combined view, hub card), routing,page_bg_class.