feat: Add FightEdit and GroupEdit components for enhanced event management
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@@ -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("");
|
||||
|
||||
Reference in New Issue
Block a user