refactor: Separate goal tracking - strategic vs tactical
Build Test / lint-backend (push) Waiting to run
Build Test / build-frontend (push) Waiting to run
Deploy Development / deploy (push) Has been cancelled

**UX Improvements:**
- Progress modal: full-width inputs, label-as-heading, left-aligned text
- Progress button only visible for custom goals (no source_table)
- Prevents confusion with automatic tracking (Weight, Activity, etc.)

**New Page: Custom Goals (Capture/Eigene Ziele):**
- Dedicated page for daily custom goal value entry
- Clean goal selection with progress bars
- Quick entry form (date, value, note)
- Recent progress history (last 5 entries)
- Mobile-optimized for daily use

**Architecture:**
- Analysis/Goals → Strategic (define goals, set priorities)
- Capture/Custom Goals → Tactical (daily value entry)
- History → Evaluation (goal achievement analysis)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-03-27 15:32:15 +01:00
1 parent 398c645a98
commit bcb867da69
4 files changed
+420 -13

No files matched your search

+41 -13
View File
@@ -704,14 +704,17 @@ export default function GoalsPage() {
</div>
<div style={{ display: 'flex', gap: 8, flexShrink: 0 }}>
<button
className="btn-secondary"
onClick={() => handleOpenProgressModal(goal)}
style={{ padding: '6px 12px' }}
title="Fortschritt erfassen"
>
<TrendingUp size={14} />
</button>
{/* Progress button only for custom goals (no automatic data source) */}
{!goal.source_table && (
<button
className="btn-secondary"
onClick={() => handleOpenProgressModal(goal)}
style={{ padding: '6px 12px' }}
title="Fortschritt erfassen"
>
<TrendingUp size={14} />
</button>
)}
<button
className="btn-secondary"
onClick={() => handleEditGoal(goal)}
@@ -1051,22 +1054,37 @@ export default function GoalsPage() {
{/* Progress Form */}
<div style={{ marginBottom: 24 }}>
<h3 style={{ fontSize: 16, marginBottom: 12 }}>Neuer Eintrag</h3>
<h3 style={{ fontSize: 16, marginBottom: 16 }}>Neuer Eintrag</h3>
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div>
<label className="form-label">Datum</label>
<div style={{
fontSize: 14,
fontWeight: 600,
marginBottom: 8,
color: 'var(--text1)'
}}>
Datum
</div>
<input
type="date"
className="form-input"
value={progressFormData.date}
onChange={(e) => setProgressFormData({ ...progressFormData, date: e.target.value })}
max={new Date().toISOString().split('T')[0]}
style={{ width: '100%', textAlign: 'left' }}
/>
</div>
<div>
<label className="form-label">Wert ({progressGoal.unit})</label>
<div style={{
fontSize: 14,
fontWeight: 600,
marginBottom: 8,
color: 'var(--text1)'
}}>
Wert ({progressGoal.unit})
</div>
<input
type="number"
step="0.01"
@@ -1074,17 +1092,26 @@ export default function GoalsPage() {
value={progressFormData.value}
onChange={(e) => setProgressFormData({ ...progressFormData, value: e.target.value })}
placeholder={`z.B. ${progressGoal.current_value || progressGoal.target_value}`}
style={{ width: '100%', textAlign: 'left' }}
/>
</div>
<div>
<label className="form-label">Notiz (optional)</label>
<div style={{
fontSize: 14,
fontWeight: 600,
marginBottom: 8,
color: 'var(--text1)'
}}>
Notiz (optional)
</div>
<textarea
className="form-input"
value={progressFormData.note}
onChange={(e) => setProgressFormData({ ...progressFormData, note: e.target.value })}
placeholder="Optionale Notiz..."
rows={2}
style={{ width: '100%', textAlign: 'left' }}
/>
</div>
@@ -1092,6 +1119,7 @@ export default function GoalsPage() {
className="btn-primary"
onClick={handleSaveProgress}
disabled={!progressFormData.value}
style={{ width: '100%' }}
>
Eintrag speichern
</button>