2026-04-07 10:21:11 +02:00
|
|
|
import { useState } from 'react'
|
2026-04-07 10:15:13 +02:00
|
|
|
import { FlaskConical } from 'lucide-react'
|
|
|
|
|
import { Link } from 'react-router-dom'
|
2026-04-07 11:47:16 +02:00
|
|
|
import { WidgetRenderer } from '../widgetSystem/dashboardWidgetRegistry'
|
|
|
|
|
import { ensurePilotLabWidgetsRegistered } from '../widgetSystem/registerPilotLabWidgets'
|
|
|
|
|
import { DEFAULT_LAB_LAYOUT } from '../widgetSystem/defaultLabLayout'
|
2026-04-07 10:15:13 +02:00
|
|
|
|
|
|
|
|
/**
|
2026-04-07 11:47:16 +02:00
|
|
|
* Pilot-Übersicht nach Product-Spec (festes Standard-Layout).
|
|
|
|
|
* Nutzt dasselbe Widget-Rendering wie /app/dashboard-lab.
|
2026-04-07 10:15:13 +02:00
|
|
|
*/
|
|
|
|
|
export default function PilotVizPage() {
|
2026-04-07 11:47:16 +02:00
|
|
|
ensurePilotLabWidgetsRegistered()
|
|
|
|
|
|
2026-04-07 11:07:33 +02:00
|
|
|
const [refreshTick, setRefreshTick] = useState(0)
|
2026-04-07 11:47:16 +02:00
|
|
|
const requestRefresh = () => setRefreshTick((t) => t + 1)
|
2026-04-07 10:15:13 +02:00
|
|
|
|
|
|
|
|
return (
|
2026-04-07 11:07:33 +02:00
|
|
|
<div style={{ paddingBottom: 96, textAlign: 'left', maxWidth: 920, margin: '0 auto' }}>
|
2026-04-07 10:15:13 +02:00
|
|
|
<div style={{ marginBottom: 20 }}>
|
|
|
|
|
<Link
|
|
|
|
|
to="/settings"
|
|
|
|
|
className="btn btn-secondary"
|
|
|
|
|
style={{ display: 'inline-flex', marginBottom: 12, textDecoration: 'none' }}
|
|
|
|
|
>
|
|
|
|
|
← Einstellungen
|
|
|
|
|
</Link>
|
|
|
|
|
<h1 className="page-title" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
|
|
|
|
<FlaskConical size={26} color="var(--accent)" />
|
2026-04-07 11:07:33 +02:00
|
|
|
Pilot: Übersicht
|
2026-04-07 10:15:13 +02:00
|
|
|
</h1>
|
2026-04-07 11:07:33 +02:00
|
|
|
<p style={{ fontSize: 13, color: 'var(--text2)', lineHeight: 1.6, marginTop: 8 }}>
|
|
|
|
|
Konfigurierbare Ziel-Übersicht (Test). Produktives Dashboard und Verlauf unverändert. Nach Speichern von
|
|
|
|
|
Gewicht oder Vitalwerten werden KPIs und Körperbereich neu geladen.
|
2026-04-07 10:15:13 +02:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-04-07 11:47:16 +02:00
|
|
|
<WidgetRenderer
|
|
|
|
|
layout={DEFAULT_LAB_LAYOUT}
|
|
|
|
|
refreshTick={refreshTick}
|
|
|
|
|
requestRefresh={requestRefresh}
|
|
|
|
|
/>
|
2026-04-07 10:15:13 +02:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|