chore: bean organisation

This commit is contained in:
2026-03-22 08:56:06 +01:00
parent f17687d2fa
commit c064a1b8d4
26 changed files with 409 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
---
# nuzlocke-tracker-e372
title: Flattened admin encounters page
status: draft
type: feature
priority: normal
created_at: 2026-03-21T21:59:20Z
updated_at: 2026-03-21T22:04:08Z
parent: nuzlocke-tracker-9i9m
---
Add a top-level `/admin/encounters` page that shows all encounters across all games and routes, with filters. This is the deepest entity in the current hierarchy and the most painful to reach.
## Approach
- New page at `/admin/encounters` showing all encounters in a table
- Columns: Pokemon, Route, Game, Encounter Rate, Method
- Filters: game dropdown, route dropdown (filtered by selected game), pokemon search
- Clicking an encounter navigates to the route detail page where it can be edited
- Requires new backend endpoint: GET /admin/encounters returning encounters joined with route name, game name, and pokemon name. Response shape: `{ id, pokemon_name, route_name, game_name, encounter_rate, method }`
## Files to modify
- `frontend/src/pages/admin/AdminEncounters.tsx` — New page
- `frontend/src/pages/admin/index.ts` — Export new page
- `frontend/src/App.tsx` — Add route
- `frontend/src/components/admin/AdminLayout.tsx` — Add nav item
- `backend/app/routes/` — Endpoint for listing all encounters with game/route context
## Checklist
- [ ] AdminEncounters page with table of all encounters
- [ ] Game filter dropdown
- [ ] Route filter dropdown (cascading from game)
- [ ] Pokemon name search
- [ ] Click navigates to route detail page
- [ ] Nav item added to admin sidebar
- [ ] Route registered in App.tsx
- [ ] Backend endpoint for listing all encounters