From 24f50750034c3f9de390686a2dbff091ac4aa2e7 Mon Sep 17 00:00:00 2001 From: Mike Dalton Date: Tue, 23 Jun 2026 21:31:03 -0400 Subject: [PATCH] Link user names in admin scenarios dashboard to filter by user Clicking a user name now navigates to the scenarios list filtered to that user via the existing q param, matching on their unique email address so the search box reflects the active filter. Co-Authored-By: Claude Opus 4.8 --- app/views/admin/scenarios/index.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/admin/scenarios/index.html.erb b/app/views/admin/scenarios/index.html.erb index 7c3ff9d..4ec3ea4 100644 --- a/app/views/admin/scenarios/index.html.erb +++ b/app/views/admin/scenarios/index.html.erb @@ -28,7 +28,12 @@ <% @scenarios.each do |scenario| %> - <%= scenario.user.display_name %> + + <%= link_to scenario.user.display_name, + admin_scenarios_path(q: scenario.user.email_address), + data: { turbo_frame: "_top" }, + class: "text-ink hover:text-ink-soft hover:underline" %> + <%= scenario.name %> <%= scenario.total_giving_amount.present? ? number_to_currency(scenario.total_giving_amount, precision: 0) : content_tag(:span, "—", class: "text-ink-faint") %>