feat: Add FightEdit and GroupEdit components for enhanced event management
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-05-10 22:22:12 +02:00
parent 7d67ad0950
commit 1da279bb24
7 changed files with 308 additions and 7 deletions

View File

@@ -26,18 +26,20 @@
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@components/ui/command";
import { teams } from "@components/stores/stores";
const { event }: { event: ExtendedEvent } = $props();
const { event = $bindable() }: { event: ExtendedEvent } = $props();
let team = $state(event.teams);
async function addTeam(value: number) {
await $eventRepo.updateTeams(event.event.id.toString(), [value]);
team = await $eventRepo.listTeams(event.event.id.toString());
event.teams = team;
}
async function removeTeam(value: number) {
await $eventRepo.deleteTeams(event.event.id.toString(), [value]);
team = await $eventRepo.listTeams(event.event.id.toString());
event.teams = team;
}
let teamSearch = $state("");