Add genlocke admin panel with CRUD endpoints and UI

Backend: PATCH/DELETE genlocke, POST/DELETE legs with order
re-numbering. Frontend: admin list page with status filter,
detail page with inline editing, legs table, and stats display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 10:51:47 +01:00
parent 08f6857451
commit a81a17c485
11 changed files with 685 additions and 12 deletions

View File

@@ -24,7 +24,10 @@ import type {
UpdateBossBattleInput,
BossPokemonInput,
BossReorderItem,
UpdateGenlockeInput,
AddGenlockeLegInput,
} from '../types'
import type { Genlocke } from '../types/game'
// Games
export const createGame = (data: CreateGameInput) =>
@@ -140,3 +143,16 @@ export const reorderBosses = (gameId: number, bosses: BossReorderItem[]) =>
export const setBossTeam = (gameId: number, bossId: number, team: BossPokemonInput[]) =>
api.put<BossBattle>(`/games/${gameId}/bosses/${bossId}/pokemon`, team)
// Genlockes
export const updateGenlocke = (id: number, data: UpdateGenlockeInput) =>
api.patch<Genlocke>(`/genlockes/${id}`, data)
export const deleteGenlocke = (id: number) =>
api.del(`/genlockes/${id}`)
export const addGenlockeLeg = (genlockeId: number, data: AddGenlockeLegInput) =>
api.post<Genlocke>(`/genlockes/${genlockeId}/legs`, data)
export const deleteGenlockeLeg = (genlockeId: number, legId: number) =>
api.del(`/genlockes/${genlockeId}/legs/${legId}`)