Add admin panel with CRUD endpoints and management UI

Add admin API endpoints for games, routes, pokemon, and route encounters
with full CRUD operations including bulk import. Build admin frontend
with game/route/pokemon management pages, navigation, and data tables.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 18:36:19 +01:00
parent a911259ef5
commit 55e6650e0e
28 changed files with 2140 additions and 10 deletions

View File

@@ -0,0 +1,39 @@
import { NavLink, Outlet } from 'react-router-dom'
const navItems = [
{ to: '/admin/games', label: 'Games' },
{ to: '/admin/pokemon', label: 'Pokemon' },
]
export function AdminLayout() {
return (
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<h1 className="text-2xl font-bold mb-6">Admin Panel</h1>
<div className="flex gap-8">
<nav className="w-48 flex-shrink-0">
<ul className="space-y-1">
{navItems.map((item) => (
<li key={item.to}>
<NavLink
to={item.to}
className={({ isActive }) =>
`block px-3 py-2 rounded-md text-sm font-medium ${
isActive
? 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-200'
: 'hover:bg-gray-100 dark:hover:bg-gray-700'
}`
}
>
{item.label}
</NavLink>
</li>
))}
</ul>
</nav>
<div className="flex-1 min-w-0">
<Outlet />
</div>
</div>
</div>
)
}