feat: goal categories and priorities - backend + API
Implemented multi-dimensional goal priorities (Option B). **Backend Changes:** - Migration 028: Added `category` + `priority` columns to goals table - Auto-migration of existing goals to categories based on goal_type - GoalCreate/GoalUpdate models extended with category + priority - New endpoint: GET /api/goals/grouped (returns goals by category) - Categories: body, training, nutrition, recovery, health, other - Priorities: 1=high (⭐⭐⭐), 2=medium (⭐⭐), 3=low (⭐) **API Changes:** - Added api.listGoalsGrouped() binding **Frontend (partial):** - Added GOAL_CATEGORIES + PRIORITY_LEVELS constants - Extended formData with category + priority fields - Removed "Gewichtung gesamt" display (useless) - Load groupedGoals in addition to flat goals list Next: Complete frontend UI rebuild for category grouping Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f51b26418
commit
6a3a782bff
3 files changed
+122
-5
No files matched your search
@@ -340,6 +340,7 @@ export const api = {
|
||||
updateFocusAreas: (d) => req('/goals/focus-areas', jput(d)),
|
||||
|
||||
listGoals: () => req('/goals/list'),
|
||||
listGoalsGrouped: () => req('/goals/grouped'),
|
||||
createGoal: (d) => req('/goals/create', json(d)),
|
||||
updateGoal: (id,d) => req(`/goals/${id}`, jput(d)),
|
||||
deleteGoal: (id) => req(`/goals/${id}`, {method:'DELETE'}),
|
||||
|
||||
Reference in new issue
Block a user