Goals -System refactored - Platzhaltersystem enhanced (als draft) #53

Merged
Lars merged 86 commits from develop into main 2026-03-31 11:46:48 +02:00
Showing only changes of commit 623f34c184 - Show all commits

View File

@ -114,6 +114,14 @@ export default function GoalsPage() {
])
setGoalMode(modeData.goal_mode)
// Debug: Check what we received from API
console.log('[DEBUG] Received goals from API:', goalsData.length)
const weightGoal = goalsData.find(g => g.goal_type === 'weight')
if (weightGoal) {
console.log('[DEBUG] Weight goal from API:', JSON.stringify(weightGoal, null, 2))
}
setGoals(goalsData)
setGroupedGoals(groupedData)
@ -188,8 +196,10 @@ export default function GoalsPage() {
}
const handleEditGoal = (goal) => {
console.log('[DEBUG] Editing goal:', goal)
console.log('[DEBUG] Editing goal ID:', goal.id)
console.log('[DEBUG] Full goal object:', JSON.stringify(goal, null, 2))
console.log('[DEBUG] start_date from goal:', goal.start_date, 'type:', typeof goal.start_date)
console.log('[DEBUG] target_date from goal:', goal.target_date, 'type:', typeof goal.target_date)
setEditingGoal(goal.id)
setFormData({