Nasconde dall'hub le partite con risultato già inserito.

Restano avviabili solo le gare in ritardo senza punteggio, non quelle già terminate dal portale.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-06 10:13:10 +02:00
co-authored by Cursor
parent 24c6ce4da0
commit ce81bb5789
5 changed files with 51 additions and 4 deletions
+5
View File
@@ -94,10 +94,15 @@ class Match < ApplicationRecord
opponent_primary_color.presence || DEFAULT_OPPONENT_COLOR
end
def result_recorded?
played? || result_status.to_s.start_with?("walkover") || (home_score.present? && away_score.present?)
end
def coach_hub_visible?
active = active_stream_session
return true if active&.resumable?
return true if active&.idle?
return false if result_recorded?
return false if stream_completed?
return true if scheduled_on_calendar?
return true if tournament_open_for_late_stream?