diff --git a/frontend/src/pages/GoalsPage.jsx b/frontend/src/pages/GoalsPage.jsx index 08d9df4..b2c1368 100644 --- a/frontend/src/pages/GoalsPage.jsx +++ b/frontend/src/pages/GoalsPage.jsx @@ -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({