debug: extensive frontend logging for goal dates
This commit is contained in:
parent
b7e7817392
commit
623f34c184
|
|
@ -114,6 +114,14 @@ export default function GoalsPage() {
|
||||||
])
|
])
|
||||||
|
|
||||||
setGoalMode(modeData.goal_mode)
|
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)
|
setGoals(goalsData)
|
||||||
setGroupedGoals(groupedData)
|
setGroupedGoals(groupedData)
|
||||||
|
|
||||||
|
|
@ -188,8 +196,10 @@ export default function GoalsPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEditGoal = (goal) => {
|
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] 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)
|
setEditingGoal(goal.id)
|
||||||
setFormData({
|
setFormData({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user