Skip to content

Commit

Permalink
Display restriction status as a tag
Browse files Browse the repository at this point in the history
When a teacher has a restriction we want to highlight it using the tag
component in red.
  • Loading branch information
felixclack committed Sep 11, 2024
1 parent 6d4ad23 commit 6235bd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/check_records/search/_results_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
body.with_row do |row|
row.with_cell(text: govuk_link_to(teacher.name, check_records_teacher_path(SecureIdentifier.encode(teacher.trn)), class: 'govuk-link--no-visited-state govuk-!-font-weight-bold'))
row.with_cell(text: teacher.trn)
row.with_cell(text: teacher.restriction_status)
row.with_cell(
text: teacher.restriction_status == 'Restriction' ? govuk_tag(text: teacher.restriction_status, colour: 'red') : teacher.restriction_status
)
row.with_cell(text: teacher.teaching_status)
row.with_cell(text: teacher.induction_status)
end
Expand Down

0 comments on commit 6235bd8

Please sign in to comment.