|
|
|
|
@ -104,20 +104,36 @@ class PlayerRegistration(SideStoreModel): |
|
|
|
|
if not self.team_registration: |
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
tournament = self.team_registration.tournament |
|
|
|
|
tournament_status_team_count = tournament.get_tournament_status_team_count() |
|
|
|
|
status = { |
|
|
|
|
'header': "Équipes", |
|
|
|
|
'position': tournament_status_team_count, |
|
|
|
|
'display_box': True, |
|
|
|
|
'box_class': 'gray', |
|
|
|
|
'short_label': 'inscrit' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tournament = self.team_registration.tournament |
|
|
|
|
team = self.team_registration |
|
|
|
|
|
|
|
|
|
# Tournament is ended with results |
|
|
|
|
if tournament.get_online_registration_status() is OnlineRegistrationStatus.ENDED_WITH_RESULTS: |
|
|
|
|
if team.get_final_ranking_component(): |
|
|
|
|
status['box_class'] = 'light-green' |
|
|
|
|
status['short_label'] = team.get_final_ranking_component() |
|
|
|
|
status['header'] = 'Rang' |
|
|
|
|
status['position'] = f"{team.get_final_ranking_component()} / {tournament_status_team_count}" |
|
|
|
|
|
|
|
|
|
if tournament.display_points_earned and team.points_earned: |
|
|
|
|
if team.final_ranking == 1: |
|
|
|
|
status['box_class'] = 'light-gold' |
|
|
|
|
elif team.final_ranking == 2: |
|
|
|
|
status['box_class'] = 'light-silver' |
|
|
|
|
elif team.final_ranking == 3: |
|
|
|
|
status['box_class'] = 'light-bronze' |
|
|
|
|
else: |
|
|
|
|
status['box_class'] = 'light-beige' |
|
|
|
|
status['short_label'] = f"{team.points_earned} pts" |
|
|
|
|
else: |
|
|
|
|
status['box_class'] = False |
|
|
|
|
return status |
|
|
|
|
|
|
|
|
|
# Team has walked out |
|
|
|
|
|