rubyforgood / rubyforgood/awbw

Optionally show program status on the org profile's Events-attended cards

Open
#2,066 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
15
Forks
26
Avg merge
12h 42m
Merged PRs (30d)
242

Description

🤖 From Claude: Raised as a "maybe" during the #1993 session; deferred.

Context

On the org profile (organizations#show), the admin-only "Program status" block shows one chip per event the org participated in — the org's facilitator-program status as of that event's date (New/Ongoing/Reinstate), each linking to the event participation report.

Separately, the "Events attended" section renders event cards (render "people/show_card" in app/views/organizations/sections/_events.html.erb) with no status on them.

Idea

Also surface each event's program status inline on its card in the Events-attended section, so the status is visible while browsing events — not only in the separate Program status block.

Notes for whoever picks this up

  • Per-event status is already computed: organization.decorate.facilitator_status_as_of(event.start_date)OrganizationDecorator.program_status_classes(status) for the pill classes (New = indigo, Ongoing = blue, Reinstate = purple).
  • Visibility mismatch to resolve: the event cards are shown to authenticated users (gated by profile_show_events_registered?), whereas the Program-status chips are admin-only (allowed_to?(:manage?, Organization)admin?). Decide whether a per-card status badge should be admin-only too, or public.
  • Avoid duplicating the existing block — a small badge on the card, not a second full chip row.
  • File: app/views/organizations/sections/_events.html.erb (the events.each card loop). The events are already loaded there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in app/views/organizations/sections/_events.html.erb at the events.each card loop, then inspect facilitator_status_as_of(event.start_date) and OrganizationDecorator.program_status_classes(status). Resolve whether the badge follows the existing admin-only visibility or is shown to authenticated viewers. Done means each Events-attended card presents the per-event status without duplicating the separate Program status block.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
authorization, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.