feat: Introduce quick capture widget configuration and validation
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 16s

- Added support for the "quick_capture" widget, allowing users to configure visibility for weight and baseline vitals (resting HR, HRV, VO₂max).
- Implemented validation logic to ensure correct configuration input and prevent errors.
- Updated the widget catalog and dashboard layout to reflect the new quick capture features.
- Removed the "training_type_distribution" widget from the catalog as part of the refactor.
- Bumped app_dashboard version to 1.6.2 to incorporate these enhancements.
This commit is contained in:
Lars committed 2026-04-07 18:02:18 +02:00
1 parent 3d498d03c1
commit 7f833b2cb1
9 files changed
+267 -107

No files matched your search

@@ -1,25 +0,0 @@
import { useNavigate } from 'react-router-dom'
import TrainingTypeDistribution from '../TrainingTypeDistribution'
/**
* @param {{ refreshTick?: number, distributionDays?: number }} props
*/
export default function TrainingTypeDistributionWidget({ refreshTick = 0, distributionDays = 28 }) {
const nav = useNavigate()
const days = Math.max(7, Math.min(120, Number(distributionDays) || 28))
return (
<div className="card section-gap" style={{ marginBottom: 16 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
<div>
<div style={{ fontSize: 14, fontWeight: 700, color: 'var(--text1)' }}>Training</div>
<div style={{ fontSize: 12, color: 'var(--text3)' }}>Verteilung der Trainingstypen ({days} Tage)</div>
</div>
<button type="button" className="btn btn-secondary" style={{ fontSize: 12, padding: '6px 12px' }} onClick={() => nav('/activity')}>
Details →
</button>
</div>
<TrainingTypeDistribution key={`${refreshTick}-${days}`} days={days} />
</div>
)
}