Exclude unapplied scholarships from the event grand total#1580
Merged
Conversation
Outstanding scholarships (tasks not yet completed) force their allocation amount to 0, so the registration's full cost still sits in outstanding_cents. grand_total_cents was also adding the awarded amount via scholarship_total_cents, double-counting that cost and pushing the grand total above the full-price total_cents. Add only applied scholarship allocations to the grand total. scholarship_total_cents stays the awarded amount because the dashboard scholarship card headline must equal its Completed + Incomplete breakdown. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
maebeale
commented
Jun 6, 2026
| # grand total above total_cents. | ||
| def grand_total_cents | ||
| registration_subtotal_cents + scholarship_total_cents + cont_ed_total_cents | ||
| registration_subtotal_cents + applied_scholarship_cents + cont_ed_total_cents |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: Used applied_scholarship_cents (allocation amounts) here rather than Copilot's suggested change to scholarship_total_cents — the card headline must stay the awarded total to match its Completed + Incomplete breakdown. Allocation amount, not completed_scholarship_cents, since fixtures can have an applied allocation while tasks_completed is still false.
maebeale
added a commit
that referenced
this pull request
Jun 6, 2026
Wire every dashboard money/headcount card color through DomainTheme instead
of hard-coded Tailwind utilities, so the dashboard stays in step with the
app-wide palette. Adds the missing keys (payments, scholarships,
continuing_education, event_dashboard, addresses) and extends the Tailwind
safelist with the hover border/text variants the helpers now generate.
Clarify the scholarship card: the headline is the full amount "potentially
awarded", with the allocated portion ("awarded", tasks complete) surfaced
separately since only that flows into the grand total. Registration fees and
cont ed headlines gain an "including due" caveat so the figures aren't read as
cash-collected.
Grand total counts allocated_scholarship_cents (renamed from
completed_scholarship_cents) rather than #1580's raw applied-allocation sum:
the awarded amount of allocated scholarships is the meaningful figure and
matches the "Completed & allocated" amount the dashboard shows, keeping the
equation internally consistent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5 tasks
maebeale
added a commit
that referenced
this pull request
Jun 7, 2026
) * Theme event dashboard cards and count only allocated scholarships Wire every dashboard money/headcount card color through DomainTheme instead of hard-coded Tailwind utilities, so the dashboard stays in step with the app-wide palette. Adds the missing keys (payments, scholarships, continuing_education, event_dashboard, addresses) and extends the Tailwind safelist with the hover border/text variants the helpers now generate. Clarify the scholarship card: the headline is the full amount "potentially awarded", with the allocated portion ("awarded", tasks complete) surfaced separately since only that flows into the grand total. Registration fees and cont ed headlines gain an "including due" caveat so the figures aren't read as cash-collected. Grand total counts allocated_scholarship_cents (renamed from completed_scholarship_cents) rather than #1580's raw applied-allocation sum: the awarded amount of allocated scholarships is the meaningful figure and matches the "Completed & allocated" amount the dashboard shows, keeping the equation internally consistent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Refine event dashboard money cards, labels, and drill-downs - Collapse each money card (Registration fees / Scholarships / Continuing education fees) into a chevron-expandable details: it shows just the total by default and expands to Paid/Due (or Completed & allocated / Incomplete & unallocated) sub-rows, which in turn expand to per-registrant lists with per-person amounts. - Add a Collected / Due / Monies cash summary beside the grand total (collected + due = monies; scholarships are excluded since they're awarded, not collected). - Clarify scholarship copy ("including unallocated"; "Completed & allocated" / "Incomplete & unallocated") and rename "Cont ed fees" to "Continuing education fees". - Registrant names now jump to the manage list filtered to that one person, with a name + organization tooltip, instead of the profile page. - "<n> inactive" links to the matching manage list with a jump icon. - Wrap the addend cards on smaller screens. Backed by EventDashboard methods (collected/due/monies_made_cents, inactive_registrant_ids, organization_names_by_registrant, and the per-recipient / per-registrant breakdown maps) with specs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add dev scholarship seeds - New db/seeds/dev/scholarships.rb seeds scholarships across the paid dev events, mixing completed (allocation funded) and pending ($0 allocation) so the dashboard shows allocated vs unallocated scholarship dollars. Only funds registrations with no allocations yet, so a full or partial award fits within the event cost (the allocation validation rejects over-allocation). - Wire db:seed:scholarships into dev.rake (run order after payments, plus a standalone task). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Scale the flagship training for the dashboard demo Make AWBW Facilitator Training a $1,500 event with a 15-registrant cohort so the scholarship seeds have room to award 10 full/partial scholarships across allocation-free registrations. Keep cost in sync on re-seed (find_or_create_by! only sets it on create), and top up generated cohort registrants idempotently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Update dashboard request spec for renamed cont ed label The dashboard now labels the card "Continuing education fees" (was "Cont ed fees"); update the request-spec assertion to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <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.
What is the goal of this PR and why is this important?
EventDashboard#grand_total_centscould exceed the full-pricetotal_centsand show scholarship dollars that were never actually applied.amountforced to 0 byScholarship#sync_allocation_amount, so that registration's full cost still sits inoutstanding_cents.grand_total_centsalso added the awarded amount viascholarship_total_cents, double-counting the same cost.How did you approach the change?
applied_scholarship_centsthat sums only scholarship allocation amounts (zero for outstanding scholarships), and used it ingrand_total_cents.scholarship_total_centsas the awarded amount: the dashboard scholarship card headline must equal its Completed + Incomplete breakdown, so it can't become applied-only (which is why Copilot's literal suggestion was adjusted rather than applied as-is).completed_scholarship_cents) because existing fixtures can have an applied allocation whiletasks_completedis still false — the allocation is the source of truth for what's been applied.UI Testing Checklist
Anything else to add?
with an outstanding (unapplied) scholarship) assertinggrand_total_cents == total_centsand that the headline still equals completed + outstanding, then made it pass. Fullevent_dashboard_specgreen (36 examples).🤖 Generated with Claude Code