53 lines
2.0 KiB
Markdown
53 lines
2.0 KiB
Markdown
---
|
|
# nuzlocke-tracker-k7ot
|
|
title: Genlocke management in admin panel
|
|
status: completed
|
|
type: feature
|
|
priority: normal
|
|
created_at: 2026-02-09T08:38:13Z
|
|
updated_at: 2026-02-09T09:51:51Z
|
|
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
|
|
- [x] Implement `GET /api/v1/genlockes` list endpoint
|
|
- [x] Implement `GET /api/v1/genlockes/{id}` detail endpoint
|
|
- [x] Implement `PATCH /api/v1/genlockes/{id}` update endpoint
|
|
- [x] Implement `DELETE /api/v1/genlockes/{id}` delete endpoint
|
|
- [x] Implement leg management endpoints (add, remove)
|
|
- [x] Build admin genlocke list page
|
|
- [x] Build admin genlocke detail/edit page
|
|
- [x] Add admin routes and sidebar navigation
|
|
- [x] Add frontend API client and hooks for genlocke admin |