WAIT: Add associated records links to person edit#1889
Draft
maebeale wants to merge 2 commits into
Draft
Conversation
Admins need to jump from a person's edit page to the records tied to that person, the same way the organization edit page already links out to its associated records. Surfaces the destinations that actually scope to the person: their event registrations (filtered index) and workshop logs (the per-person view). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
maebeale
commented
Jun 23, 2026
| @@ -0,0 +1,5 @@ | |||
| <% return unless person.persisted? %> | |||
| <ul class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-x-6 gap-y-2"> | |||
| <li><%= index_button person.event_registrations, params: { registrant_id: person.id } %></li> | |||
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: Only these two records get cards because they have person-scoped destinations: registrations filter on registrant_id, and workshop_logs_person_path is the per-person view. Scholarships/grants/form-submissions have no person-filtered index, so a card would land on an unfiltered list — omitted intentionally.
Adds two more cards to the person edit "Associated records" section. Scholarships needed a recipient_id filter on its index (it only grouped by funder before) so the card lands on that person's awards rather than the full list; notifications reuse the existing email filter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
maebeale
commented
Jun 23, 2026
| { grant: :donor }, | ||
| { recipient: [ { affiliations: { organization: :addresses } }, { event_registrations: :event } ] } | ||
| ) | ||
| if params[:recipient_id].present? |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: The scholarships index previously only grouped by funder with no per-recipient view, so this adds a recipient_id filter (applied before grouping) so the person-edit card lands on just that person's awards.
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.
🤖 PR, suggested 👤 review level: 📖 Read — light-logic: a new view partial plus a small recipient_id filter on the scholarships index
What is the goal of this PR and why is this important?
How did you approach the change?
people/_associated_records.html.erbpartial, rendered in the person form (persisted only), styled to match the org version.registrant_idworkshop_logs_person_pathviewrecipient_idfilter to the scholarships index (it previously only grouped by funder with no way to scope to one person) plus a "Filtered to " banner with a Clear linkemailfilter, scoped to the person'spreferred_emailPersonPolicy#edit? == admin?), so no per-card auth guards are needed.Anything else to add?