feat: Skills & Methods catalog complete
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 14s

Backend:
- Created routers/skills.py with full CRUD
  - Skills: list (with category filter), get, create, update, delete
  - Methods: list (with category filter), get, create, update, delete
  - Default: only show active items
  - Read access: all authenticated users
  - Write access: admin only
- Registered skills router in main.py

Frontend:
- Complete SkillsPage with 2 tabs (Fähigkeiten, Trainingsmethoden)
- Browse by category with cards layout
- Admin CRUD forms (importance rating for skills, duration/group size for methods)
- Mobile-responsive grid layout
- Updated api.js with all skill/method functions
- Added /skills route to App.jsx

Migration already exists: 003_catalogs.sql (skills, training_methods + seed data)

Next: Training Planning (core feature)
This commit is contained in:
Lars committed 2026-04-22 16:50:31 +02:00
1 parent 8e027e02bb
commit 505a8e5e38
5 files changed
+912 -7

No files matched your search

+42 -4
View File
@@ -144,8 +144,13 @@ export async function deleteTrainingGroup(id) {
// Skills & Methods
// ============================================================================
export async function listSkills() {
return request('/api/skills')
export async function listSkills(filters = {}) {
const query = new URLSearchParams(filters).toString()
return request(`/api/skills${query ? '?' + query : ''}`)
}
export async function getSkill(id) {
return request(`/api/skills/${id}`)
}
export async function createSkill(data) {
@@ -155,8 +160,24 @@ export async function createSkill(data) {
})
}
export async function listMethods() {
return request('/api/methods')
export async function updateSkill(id, data) {
return request(`/api/skills/${id}`, {
method: 'PUT',
body: JSON.stringify(data)
})
}
export async function deleteSkill(id) {
return request(`/api/skills/${id}`, { method: 'DELETE' })
}
export async function listMethods(filters = {}) {
const query = new URLSearchParams(filters).toString()
return request(`/api/methods${query ? '?' + query : ''}`)
}
export async function getMethod(id) {
return request(`/api/methods/${id}`)
}
export async function createMethod(data) {
@@ -166,6 +187,17 @@ export async function createMethod(data) {
})
}
export async function updateMethod(id, data) {
return request(`/api/methods/${id}`, {
method: 'PUT',
body: JSON.stringify(data)
})
}
export async function deleteMethod(id) {
return request(`/api/methods/${id}`, { method: 'DELETE' })
}
// ============================================================================
// Exercises
// ============================================================================
@@ -261,9 +293,15 @@ export const api = {
// Skills & Methods
listSkills,
getSkill,
createSkill,
updateSkill,
deleteSkill,
listMethods,
getMethod,
createMethod,
updateMethod,
deleteMethod,
// Exercises
listExercises,