Add genlocke admin management bean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
---
|
||||
# nuzlocke-tracker-k7ot
|
||||
title: Genlocke management in admin panel
|
||||
status: todo
|
||||
type: feature
|
||||
created_at: 2026-02-09T08:38:13Z
|
||||
updated_at: 2026-02-09T08:38:13Z
|
||||
parent: nuzlocke-tracker-25mh
|
||||
---
|
||||
|
||||
Add genlocke management to the admin panel, allowing admins to view, edit, and delete genlockes and their legs.
|
||||
|
||||
## Admin Pages
|
||||
|
||||
### Genlocke List (`/admin/genlockes`)
|
||||
- Table of all genlockes: name, status, number of legs, created date
|
||||
- Status badge (active / completed / failed)
|
||||
- Click to view/edit details
|
||||
- Delete button with confirmation
|
||||
|
||||
### Genlocke Detail (`/admin/genlockes/:genlockeId`)
|
||||
- Edit genlocke name and status
|
||||
- View and manage legs: reorder, add, remove
|
||||
- Change the game assigned to a leg
|
||||
- View linked runs (with links to admin run detail)
|
||||
- Delete genlocke with cascade confirmation
|
||||
|
||||
## Backend
|
||||
- `GET /api/v1/genlockes` — List all genlockes with legs (may already exist from overview page bean)
|
||||
- `GET /api/v1/genlockes/{id}` — Get full genlocke detail
|
||||
- `PATCH /api/v1/genlockes/{id}` — Update genlocke name, status, rules
|
||||
- `DELETE /api/v1/genlockes/{id}` — Delete genlocke and cascade to legs
|
||||
- `POST /api/v1/genlockes/{id}/legs` — Add a leg
|
||||
- `DELETE /api/v1/genlockes/{id}/legs/{legId}` — Remove a leg
|
||||
- `PUT /api/v1/genlockes/{id}/legs/reorder` — Reorder legs
|
||||
|
||||
## Frontend
|
||||
- New admin routes: `/admin/genlockes`, `/admin/genlockes/:genlockeId`
|
||||
- Add "Genlockes" nav item to admin sidebar
|
||||
- Admin list and detail page components
|
||||
- API client functions and hooks for admin CRUD operations
|
||||
|
||||
## Checklist
|
||||
- [ ] Implement `GET /api/v1/genlockes` list endpoint
|
||||
- [ ] Implement `GET /api/v1/genlockes/{id}` detail endpoint
|
||||
- [ ] Implement `PATCH /api/v1/genlockes/{id}` update endpoint
|
||||
- [ ] Implement `DELETE /api/v1/genlockes/{id}` delete endpoint
|
||||
- [ ] Implement leg management endpoints (add, remove, reorder)
|
||||
- [ ] Build admin genlocke list page
|
||||
- [ ] Build admin genlocke detail/edit page
|
||||
- [ ] Add admin routes and sidebar navigation
|
||||
- [ ] Add frontend API client and hooks for genlocke admin
|
||||
Reference in New Issue
Block a user