diff --git a/frontend/src/pages/GoalsPage.jsx b/frontend/src/pages/GoalsPage.jsx index 02f417a..c26fc51 100644 --- a/frontend/src/pages/GoalsPage.jsx +++ b/frontend/src/pages/GoalsPage.jsx @@ -196,7 +196,7 @@ export default function GoalsPage() { priority: goal.priority || 2, target_value: goal.target_value, unit: goal.unit, - start_date: goal.start_date || new Date().toISOString().split('T')[0], + start_date: goal.start_date || '', // Load actual date or empty (not today!) target_date: goal.target_date || '', name: goal.name || '', description: goal.description || '', @@ -683,14 +683,24 @@ export default function GoalsPage() { Ziel:{' '} {goal.target_value} {goal.unit} - {goal.target_date && ( -
- - {dayjs(goal.target_date).format('DD.MM.YYYY')} -
- )} + {/* Timeline: Start → Ziel */} + {(goal.start_date || goal.target_date) && ( +
+ {goal.start_date && ( + <> + + {dayjs(goal.start_date).format('DD.MM.YY')} + + )} + {goal.start_date && goal.target_date && } + {goal.target_date && ( + {dayjs(goal.target_date).format('DD.MM.YY')} + )} +
+ )} + {goal.progress_pct !== null && (
setFormData(f => ({ ...f, start_date: e.target.value }))} />