Improve admin panel UX with toasts, evolution CRUD, sorting, drag-and-drop, and responsive layout
Add sonner toast notifications to all mutations, evolution management backend (CRUD endpoints with search/pagination) and frontend (form modal with pokemon selector, paginated list page), sortable AdminTable columns (Region/Gen/Year on Games), drag-and-drop route reordering via @dnd-kit, skeleton loading states, card-styled table wrappers, and responsive mobile nav in AdminLayout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,3 +86,46 @@ class BulkImportResult(CamelModel):
|
||||
created: int
|
||||
updated: int
|
||||
errors: list[str]
|
||||
|
||||
|
||||
# --- Evolution admin schemas ---
|
||||
|
||||
|
||||
class EvolutionAdminResponse(CamelModel):
|
||||
id: int
|
||||
from_pokemon_id: int
|
||||
to_pokemon_id: int
|
||||
from_pokemon: PokemonResponse
|
||||
to_pokemon: PokemonResponse
|
||||
trigger: str
|
||||
min_level: int | None
|
||||
item: str | None
|
||||
held_item: str | None
|
||||
condition: str | None
|
||||
|
||||
|
||||
class PaginatedEvolutionResponse(CamelModel):
|
||||
items: list[EvolutionAdminResponse]
|
||||
total: int
|
||||
limit: int
|
||||
offset: int
|
||||
|
||||
|
||||
class EvolutionCreate(CamelModel):
|
||||
from_pokemon_id: int
|
||||
to_pokemon_id: int
|
||||
trigger: str
|
||||
min_level: int | None = None
|
||||
item: str | None = None
|
||||
held_item: str | None = None
|
||||
condition: str | None = None
|
||||
|
||||
|
||||
class EvolutionUpdate(CamelModel):
|
||||
from_pokemon_id: int | None = None
|
||||
to_pokemon_id: int | None = None
|
||||
trigger: str | None = None
|
||||
min_level: int | None = None
|
||||
item: str | None = None
|
||||
held_item: str | None = None
|
||||
condition: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user