debug: extensive frontend logging for goal dates
This commit is contained in:
1 parent
b7e7817392
commit
623f34c184
1 file changed
+11
-1
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user