Skip to content

Commit c17a2f7

Browse files
maebealeclaude
andcommitted
Show only the primary sector on the people index
Listing every sector made the search table noisy. Show just the primary sector as the darker-green starred chip — the same treatment used on the profile and recipients page — keeping the index scannable while the full set stays on the profile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cedcc19 commit c17a2f7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/views/people/people_results.html.erb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@
3737
</td>
3838
<!-- Sectors -->
3939
<td class="px-4 py-2 text-sm text-gray-800">
40-
<% sectors = person.sectorable_items.sort_by { |si| [ si.is_primary? ? 0 : 1, si.sector&.name.to_s.downcase ] } %>
40+
<%# Index stays scannable: show only the primary sector(s) as the
41+
darker-green starred chip; the full set lives on the profile. %>
42+
<% sectors = person.sectorable_items.select(&:is_primary?).sort_by { |si| si.sector&.name.to_s.downcase } %>
4143
<% if sectors.any? %>
4244
<div class="flex flex-wrap gap-2">
4345
<% sectors.each do |si| %>
4446
<%= render "sectors/tagging_label",
4547
sector: si.sector,
46-
is_primary: si.is_primary?,
48+
is_primary: true,
4749
display_leader: true,
4850
is_leader: si.is_leader %>
4951
<% end %>

0 commit comments

Comments
 (0)