Refactor event and fight repositories to use numeric IDs for groups; update datetime picker input handling; add new generator components for event fights and group phases.
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-09-16 18:03:29 +02:00
parent 5f12a0cc7a
commit a3b4a6d0c2
12 changed files with 387 additions and 36 deletions

View File

@@ -150,7 +150,7 @@ export class EventRepo {
.then((value) => value.json())
.then((value) => z.array(ResponseGroupsSchema).parse(value));
}
public async createGroup(eventId: string, group: CreateEventGroup): Promise<ResponseGroups> {
public async createGroup(eventId: number, group: CreateEventGroup): Promise<ResponseGroups> {
CreateEventGroupSchema.parse(group);
return await fetchWithToken(this.token, `/events/${eventId}/groups`, {
method: "POST",

View File

@@ -31,7 +31,7 @@ export interface CreateFight {
redTeam: number;
start: Dayjs;
spectatePort: number | null;
group: string | null;
group: number | null;
}
export interface UpdateFight {
@@ -57,7 +57,6 @@ export class FightRepo {
return await fetchWithToken(this.token, `/events/${eventId}/fights`, {
method: "POST",
body: JSON.stringify({
event: eventId,
spielmodus: fight.spielmodus,
map: fight.map,
blueTeam: fight.blueTeam,