feat: add fitness_history_viz widget and enhance configuration handling
- Introduced the `fitness_history_viz` widget to the dashboard, enabling users to visualize fitness history data. - Updated widget configuration to include `fitness_history_viz` in the allowed widgets and added validation for its configuration. - Enhanced the widget catalog with details for the new `fitness_history_viz` entry. - Implemented default values and validation logic for the widget's configuration, ensuring proper handling of user inputs. - Added tests to ensure proper validation of the `fitness_history_viz` widget configuration. - Bumped application version to reflect the addition of the new widget.
This commit is contained in:
1 parent
db5557e4aa
commit
d22e0ba0a7
14 files changed
+616
-179
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import FitnessDashboardOverview from '../FitnessDashboardOverview'
|
||||
|
||||
/**
|
||||
* Verlauf → Fitness bzw. Dashboard-Widget: GET /charts/fitness-dashboard-viz (Layer 2b).
|
||||
* @param {number} [props.externalPeriod] — Widget: feste Tage (7–90)
|
||||
* @param {number} [props.period] — Verlauf: gesteuerter Zeitraum (inkl. 9999)
|
||||
* @param {(n: number) => void} [props.onPeriodChange]
|
||||
* @param {boolean} [props.hidePeriodSelector]
|
||||
* @param {boolean} [props.embedded]
|
||||
* @param {Record<string, unknown>} [props.visibility] — undefined = volle Übersicht (wie bisher)
|
||||
* @param {import('react').ReactNode} [props.footer]
|
||||
*/
|
||||
export default function FitnessHistoryVizSection({
|
||||
externalPeriod,
|
||||
period,
|
||||
onPeriodChange,
|
||||
hidePeriodSelector,
|
||||
embedded,
|
||||
visibility,
|
||||
footer,
|
||||
}) {
|
||||
return (
|
||||
<FitnessDashboardOverview
|
||||
period={period}
|
||||
onPeriodChange={onPeriodChange}
|
||||
hidePeriodSelector={hidePeriodSelector}
|
||||
externalPeriod={externalPeriod}
|
||||
embedded={embedded}
|
||||
visibility={visibility}
|
||||
footer={footer}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user