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 327319115d - Show all commits

View File

@ -89,6 +89,7 @@ export default function GoalsPage() {
priority: 2,
target_value: '',
unit: 'kg',
start_date: new Date().toISOString().split('T')[0], // Default to today
target_date: '',
name: '',
description: '',
@ -666,6 +667,11 @@ export default function GoalsPage() {
<div>
<span style={{ color: 'var(--text2)' }}>Start:</span>{' '}
<strong>{goal.start_value} {goal.unit}</strong>
{goal.start_date && (
<span style={{ fontSize: 12, color: 'var(--text3)', marginLeft: 4 }}>
({dayjs(goal.start_date).format('DD.MM.YY')})
</span>
)}
</div>
<div>
<span style={{ color: 'var(--text2)' }}>Aktuell:</span>{' '}
@ -1085,6 +1091,29 @@ export default function GoalsPage() {
</div>
</div>
{/* Startdatum */}
<div style={{ marginBottom: 16 }}>
<label style={{
display: 'block',
fontSize: 13,
fontWeight: 500,
marginBottom: 4,
color: 'var(--text2)'
}}>
Startdatum
</label>
<input
type="date"
className="form-input"
style={{ width: '100%', textAlign: 'left' }}
value={formData.start_date || new Date().toISOString().split('T')[0]}
onChange={e => setFormData(f => ({ ...f, start_date: e.target.value }))}
/>
<div style={{ fontSize: 12, color: 'var(--text3)', marginTop: 4 }}>
Startwert wird automatisch aus historischen Daten ermittelt
</div>
</div>
{/* Zieldatum */}
<div style={{ marginBottom: 16 }}>
<label style={{