can now only join when in registration period and added test users

This commit is contained in:
2026-03-12 12:20:32 +01:00
parent bd56d97b6d
commit eb81fdb206
4 changed files with 22 additions and 8 deletions

View File

@@ -155,10 +155,16 @@ class _TournamentDetailPageState extends State<TournamentDetailPage> {
child: Padding(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 24),
child: ElevatedButton(
child: Text("Join with Team"),
onPressed: () {
_showJoinTeamDialog(context, widget.tournament.id);
},
onPressed: widget.tournament.isRegistrationOpen
? () => _showJoinTeamDialog(context, widget.tournament.id)
: null,
child: Text(
widget.tournament.isRegistrationFuture
? "Registration not open yet"
: widget.tournament.isRegistrationPast
? "Registration closed"
: "Join with Team",
),
),
),
),