feat: Admin-managed exercise catalogs + frontend integration
Backend (already committed): - Migration 007: focus_areas, training_styles, training_characters, skill_categories tables - routers/catalogs.py: 20 CRUD endpoints for all catalogs - routers/exercises.py: Updated to support new FK fields - Trainer focus area assignment for role-based filtering Frontend (new): - AdminCatalogsPage: Comprehensive admin UI with 5 tabs - Focus Areas (with color + icon) - Training Styles (hierarchical with parent_style_id) - Training Characters - Skill Categories (hierarchical) - Trainer Assignments (trainer → focus area mapping) - ExercisesPage: Updated to use catalog dropdowns - Focus area dropdown now loads from API - Added missing Training Style dropdown - Training character dropdown now loads from API - Uses IDs instead of hard-coded text values - App.jsx: Added /admin/catalogs route - api.js: Added all catalog endpoints All form fields standardized: labels on top, full width, left-aligned Ready for testing via /admin/catalogs
This commit is contained in:
1 parent
74a92439eb
commit
c7cda03201
4 files changed
+901
-17
No files matched your search
@@ -10,6 +10,7 @@ import ExercisesPage from './pages/ExercisesPage'
|
||||
import ClubsPage from './pages/ClubsPage'
|
||||
import SkillsPage from './pages/SkillsPage'
|
||||
import TrainingPlanningPage from './pages/TrainingPlanningPage'
|
||||
import AdminCatalogsPage from './pages/AdminCatalogsPage'
|
||||
import './app.css'
|
||||
|
||||
// Bottom Navigation (Mobile)
|
||||
@@ -176,6 +177,14 @@ function AppRoutes() {
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/admin/catalogs"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AdminCatalogsPage />
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Catch all - redirect to dashboard or login */}
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
|
||||
Reference in new issue
Block a user