fix: add dashboard weight enforcement and fix hover tooltips
Deploy Development / deploy (push) Successful in 35s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s

- Dashboard QuickWeight: Feature limit enforcement hinzugefügt
- Hover-Tooltip Fix: Button in div wrapper (disabled buttons zeigen keine nativen tooltips)
- Error handling für Dashboard weight input
- Konsistentes UX über alle Eingabe-Screens

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-03-21 07:25:47 +01:00
1 parent 0f019f87a4
commit d13c2c7e25
4 files changed
+94 -39

No files matched your search

+14 -10
View File
@@ -111,18 +111,22 @@ export default function WeightScreen() {
{error}
</div>
)}
<button
className="btn btn-primary btn-full"
onClick={handleSave}
disabled={saving || !newWeight || (weightUsage && !weightUsage.allowed)}
<div
title={weightUsage && !weightUsage.allowed ? `Limit erreicht (${weightUsage.used}/${weightUsage.limit}). Kontaktiere den Admin oder warte bis zum nächsten Reset.` : ''}
style={{cursor: (weightUsage && !weightUsage.allowed) ? 'not-allowed' : 'pointer'}}
style={{display:'inline-block',width:'100%'}}
>
{saved ? <><Check size={15}/> Gespeichert!</>
: saving ? <><div className="spinner" style={{width:14,height:14}}/> …</>
: (weightUsage && !weightUsage.allowed) ? '🔒 Limit erreicht'
: 'Speichern'}
</button>
<button
className="btn btn-primary btn-full"
onClick={handleSave}
disabled={saving || !newWeight || (weightUsage && !weightUsage.allowed)}
style={{cursor: (weightUsage && !weightUsage.allowed) ? 'not-allowed' : 'pointer'}}
>
{saved ? <><Check size={15}/> Gespeichert!</>
: saving ? <><div className="spinner" style={{width:14,height:14}}/> …</>
: (weightUsage && !weightUsage.allowed) ? '🔒 Limit erreicht'
: 'Speichern'}
</button>
</div>
</div>
{/* Chart */}