upcoming tournament page, minor changes

This commit is contained in:
yohlo
2025-09-09 23:20:19 -05:00
parent c5d69f1a19
commit c74da09bde
29 changed files with 1125 additions and 46 deletions

View File

@@ -18,6 +18,17 @@ export function createTournamentsService(pb: PocketBase) {
});
return transformTournament(result);
},
async getMostRecentTournament(): Promise<Tournament> {
const result = await pb
.collection("tournaments")
.getFirstListItem('',
{
expand: "teams, teams.players, matches, matches.tournament, matches.home, matches.away",
sort: "-created",
}
);
return transformTournament(result);
},
async listTournaments(): Promise<TournamentInfo[]> {
const result = await pb
.collection("tournaments")