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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user