Skip to content

Commit

Permalink
fix(filter buttons): display groupe instructeur label instead of id
Browse files Browse the repository at this point in the history
  • Loading branch information
E-L-T committed Mar 3, 2025
1 parent b6024b5 commit 54fbcd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/components/instructeurs/filter_buttons_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def human_value(filter_column)

if column.type == :date || column.type == :datetime
helpers.try_parse_format_date(filter)
elsif column.groupe_instructeur?
current_instructeur.groupe_instructeurs
.find { _1.id == filter.to_i }&.label || filter

Check warning on line 55 in app/components/instructeurs/filter_buttons_component.rb

View check run for this annotation

Codecov / codecov/patch

app/components/instructeurs/filter_buttons_component.rb#L55

Added line #L55 was not covered by tests
else
column.label_for_value(filter)
end
Expand Down

0 comments on commit 54fbcd0

Please sign in to comment.