Show offline contestants in dashboard
Some checks failed
CI / scan_ruby (push) Failing after 18s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 17s
CI / test (push) Failing after 53s

This commit is contained in:
sto
2025-11-05 17:18:47 +01:00
parent d62b46b7df
commit 5348574ea4
11 changed files with 73 additions and 36 deletions

View File

@@ -75,10 +75,10 @@ javascript:
table.table.table-striped.table-hover
thead
tr
th
= t("helpers.rank")
th
= t("activerecord.attributes.contestant.name")
th
= t("activerecord.attributes.contestant.offline")
th
= t("activerecord.attributes.contestant.completions")
th
@@ -86,10 +86,14 @@ javascript:
tbody
- @contestants.each_with_index do |contestant, index|
tr scope="row"
td
= index + 1
td
= contestant.name
td
- if contestant.offline.present?
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square" viewBox="0 0 16 16">
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
<path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
</svg>
td
= contestant.completions.where(remaining_pieces: nil).length
td