Enable Team Tournaments, add Tournament Trees, implement temporary tree persistance (#66)

Co-authored-by: David Rodenkirchen <drodenkirchen@linetco.com>
Reviewed-on: #66
This commit was merged in pull request #66.
This commit is contained in:
2026-04-18 14:42:28 +00:00
parent c349fe475b
commit 6666e79178
12 changed files with 466 additions and 43 deletions
@@ -11,7 +11,7 @@ from src.ezgg_lan_manager.components.MainViewContentBox import MainViewContentBo
from src.ezgg_lan_manager.types.DateUtil import weekday_to_display_text
from src.ezgg_lan_manager.types.Participant import Participant
from src.ezgg_lan_manager.types.Tournament import Tournament
from src.ezgg_lan_manager.types.TournamentBase import TournamentStatus
from src.ezgg_lan_manager.types.TournamentBase import TournamentStatus, TournamentError
logger = logging.getLogger(__name__.split(".")[-1])
@@ -29,7 +29,10 @@ class ManageTournamentsPage(Component):
async def on_start_pressed(self, tournament_id: int) -> None:
logger.info(f"Starting tournament with ID {tournament_id}")
await self.session[TournamentService].start_tournament(tournament_id)
try:
await self.session[TournamentService].start_tournament(tournament_id)
except TournamentError as e:
logger.error(f"Error trying to start tournament: {e}")
async def on_cancel_pressed(self, tournament_id: int) -> None:
logger.info(f"Canceling tournament with ID {tournament_id}")
@@ -92,9 +95,17 @@ class ManageTournamentsPage(Component):
font_size=1.2
),
margin_top=2,
margin_bottom=2,
margin_bottom=1,
align_x=0.5
),
Button(
content="Cache erneuern",
shape="rectangle",
style="colored-text",
margin_bottom=2,
align_x=0.5,
on_press=self.session[TournamentService].queue_cache_renewal
),
*tournament_rows
)
),