Skip to content

Add facilitator/job affiliation helpers and wire scholarship recipients page#1757

Draft
maebeale wants to merge 2 commits into
mainfrom
maebeale/scholarships-page-fields
Draft

Add facilitator/job affiliation helpers and wire scholarship recipients page#1757
maebeale wants to merge 2 commits into
mainfrom
maebeale/scholarships-page-fields

Conversation

@maebeale

@maebeale maebeale commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

  • The event scholarships (recipients) page and the scholarships index both need a recipient's job title (from their real-job affiliation) and their program org + city/state (from their separate "AWBW Facilitator" affiliation) — a person typically holds both affiliations to the same org.
  • This encodes that distinction once in the model and wires the recipients page to it, instead of each page re-filtering affiliation titles ad hoc.

How did you approach the change?

  • Added symmetric Person#facilitator_affiliation / #job_affiliation helpers (active, most-recent; in-memory selection to reuse preloaded affiliations) and reduced program_organization to facilitator_affiliation&.organization; added the Affiliation.jobs scope to pair with .facilitators.
  • Rewired the recipients header to show the program org + its program_location (city/state) and the job title, and preloaded affiliations → organization → addresses on the dashboard query so the new city/state cell adds no per-row queries.
  • Documented the two-roles-per-org convention in AGENTS.md (and to never call it an "agency" in code); added model specs and updated the recipients request spec to the new behavior.

UI Testing Checklist

  • On events/:id/scholarships, each recipient shows their program org (linked), its city/state, and their real-job title — not the "Facilitator" title.
  • Recipients with only one of the two affiliations still render correctly (org/location or title omitted as appropriate).

Anything else to add?

  • Open follow-ups for the scholarships-page fields: the credentials name suffix, and primary/additional ages (now that age categories carry is_primary).

maebeale and others added 2 commits June 18, 2026 16:26
People hold two affiliations to the same org — a real job and an "AWBW
Facilitator" role — that drive different scholarship-page display data, so
each side needs an explicit, intention-revealing accessor rather than ad-hoc
title filtering at each call site.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The recipients header filtered affiliations inline (event-date-active,
non-facilitator) and showed that org + title. Switch it to the shared
Person helpers so it matches the scholarships index: program org + its
city/state from the facilitator affiliation, job title from the real-job
affiliation. Preload affiliations → organization → addresses on the
dashboard query so the new city/state cell adds no per-row queries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale changed the title Add facilitator/job affiliation helpers to Person Add facilitator/job affiliation helpers and wire scholarship recipients page Jun 18, 2026
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.

1 participant