2026-03-23 16:03:12 +01:00
|
|
|
import { useState, useEffect } from 'react'
|
2026-03-23 14:52:09 +01:00
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import 'dayjs/locale/de'
|
|
|
|
|
dayjs.locale('de')
|
|
|
|
|
|
2026-03-23 16:03:12 +01:00
|
|
|
/**
|
|
|
|
|
* VitalsPage - Refactored v9d Phase 2d
|
|
|
|
|
*
|
|
|
|
|
* Separated into:
|
|
|
|
|
* - Tab 1: Morgenmessung (Baseline) - once daily
|
|
|
|
|
* - Tab 2: Blutdruck (BP) - multiple daily with context
|
|
|
|
|
* - Tab 3: Import
|
|
|
|
|
*/
|
2026-03-23 14:52:09 +01:00
|
|
|
export default function VitalsPage() {
|
2026-03-23 16:03:12 +01:00
|
|
|
const [tab, setTab] = useState('baseline')
|
2026-03-23 15:26:51 +01:00
|
|
|
|
2026-03-23 14:52:09 +01:00
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<h1 className="page-title">Vitalwerte</h1>
|
|
|
|
|
|
|
|
|
|
<div className="tabs" style={{ overflowX: 'auto', flexWrap: 'nowrap' }}>
|
2026-03-23 16:03:12 +01:00
|
|
|
<button className={'tab' + (tab === 'baseline' ? ' active' : '')} onClick={() => setTab('baseline')}>
|
|
|
|
|
Morgenmessung
|
2026-03-23 14:52:09 +01:00
|
|
|
</button>
|
2026-03-23 16:03:12 +01:00
|
|
|
<button className={'tab' + (tab === 'bp' ? ' active' : '')} onClick={() => setTab('bp')}>
|
|
|
|
|
Blutdruck
|
2026-03-23 14:52:09 +01:00
|
|
|
</button>
|
2026-03-23 15:26:51 +01:00
|
|
|
<button className={'tab' + (tab === 'import' ? ' active' : '')} onClick={() => setTab('import')}>
|
|
|
|
|
Import
|
|
|
|
|
</button>
|
2026-03-23 14:52:09 +01:00
|
|
|
</div>
|
|
|
|
|
|
2026-03-23 16:03:12 +01:00
|
|
|
{tab === 'baseline' && (
|
2026-03-23 14:52:09 +01:00
|
|
|
<div className="card section-gap">
|
2026-03-23 16:03:12 +01:00
|
|
|
<div className="card-title">Morgenmessung (Baseline-Vitals)</div>
|
|
|
|
|
<p style={{ fontSize: 13, color: 'var(--text3)' }}>
|
|
|
|
|
Einmal täglich, morgens vor dem Aufstehen:
|
|
|
|
|
Ruhepuls, HRV, VO2 Max, SpO2, Atemfrequenz
|
|
|
|
|
</p>
|
|
|
|
|
<div style={{ padding: 20, textAlign: 'center', color: 'var(--text3)' }}>
|
|
|
|
|
🚧 Frontend-Refactoring läuft noch...<br />
|
|
|
|
|
Nutze vorerst die alten Endpoints oder warte auf Update.
|
2026-03-23 14:52:09 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
2026-03-23 16:03:12 +01:00
|
|
|
{tab === 'bp' && (
|
2026-03-23 14:52:09 +01:00
|
|
|
<div className="card section-gap">
|
2026-03-23 16:03:12 +01:00
|
|
|
<div className="card-title">Blutdruck (mehrfach täglich)</div>
|
|
|
|
|
<p style={{ fontSize: 13, color: 'var(--text3)' }}>
|
|
|
|
|
Mehrfach täglich mit Kontext-Tagging:
|
|
|
|
|
Nüchtern, Nach dem Essen, Vor/Nach Training, Abends, Stress
|
2026-03-23 14:52:09 +01:00
|
|
|
</p>
|
2026-03-23 16:03:12 +01:00
|
|
|
<div style={{ padding: 20, textAlign: 'center', color: 'var(--text3)' }}>
|
|
|
|
|
🚧 Frontend-Refactoring läuft noch...<br />
|
|
|
|
|
Nutze vorerst die alten Endpoints oder warte auf Update.
|
2026-03-23 15:26:51 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
2026-03-23 16:03:12 +01:00
|
|
|
{tab === 'import' && (
|
2026-03-23 14:52:09 +01:00
|
|
|
<div className="card section-gap">
|
2026-03-23 16:03:12 +01:00
|
|
|
<div className="card-title">CSV Import</div>
|
|
|
|
|
<p style={{ fontSize: 13, color: 'var(--text3)' }}>
|
|
|
|
|
Omron (Blutdruck) + Apple Health (Baseline-Vitals)
|
|
|
|
|
</p>
|
|
|
|
|
<div style={{ padding: 20, textAlign: 'center', color: 'var(--text3)' }}>
|
|
|
|
|
🚧 Frontend-Refactoring läuft noch...<br />
|
|
|
|
|
Import-Funktionen folgen im nächsten Update.
|
2026-03-23 14:52:09 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|