mitai-jinkendo/frontend/src/components/dashboard-widgets/QuickWeightTodayWidget.jsx
Lars 3d498d03c1
All checks were successful
Deploy Development / deploy (push) Successful in 48s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 16s
feat: Enhance dashboard widget configuration and introduce new widgets
- Updated the dashboard layout schema to include new widgets: DashboardGreeting, QuickWeightToday, BodyStatStrip, StatusPills, ProfileGoalsProgress, TrendKcalWeight, NutritionActivitySummary, RecoverySleepRest, and TrainingTypeDistribution.
- Improved widget configuration validation to support new features, including chart days for trend and distribution widgets.
- Refactored the default lab layout to align with the updated widget catalog and ensure proper default activation.
- Bumped app_dashboard version to 1.6.0 to reflect the addition of new widgets and configuration enhancements.
2026-04-07 14:19:45 +02:00

21 lines
866 B
JavaScript

import { useNavigate } from 'react-router-dom'
import QuickWeightEntry from '../QuickWeightEntry'
export default function QuickWeightTodayWidget({ onSaved }) {
const nav = useNavigate()
return (
<div className="card section-gap" style={{ marginBottom: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, marginBottom: 10 }}>
<div>
<div style={{ fontSize: 14, fontWeight: 700, color: 'var(--text1)' }}>Gewicht heute</div>
<div style={{ fontSize: 12, color: 'var(--text3)' }}>Tageswert erfassen</div>
</div>
<button type="button" className="btn btn-secondary" style={{ fontSize: 12, padding: '6px 12px' }} onClick={() => nav('/weight')}>
Alle Einträge
</button>
</div>
<QuickWeightEntry onSaved={onSaved} />
</div>
)
}