Indvidual Dashboard V0.9 #67
|
|
@ -149,7 +149,7 @@ export default function AdminReferenceValueTypesPage() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<div className="page" style={{ textAlign: 'left' }}>
|
||||
<div className="page-header" style={{ marginBottom: 16 }}>
|
||||
<h1 style={{ display: 'flex', alignItems: 'center', gap: 10, fontSize: 22, margin: 0 }}>
|
||||
<Gauge size={26} color="var(--accent)" />
|
||||
|
|
@ -199,9 +199,9 @@ export default function AdminReferenceValueTypesPage() {
|
|||
<X size={16} />
|
||||
</button>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-admin-key">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-admin-key">
|
||||
Technischer Schlüssel (key)
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -213,12 +213,12 @@ export default function AdminReferenceValueTypesPage() {
|
|||
placeholder="z. B. max_heart_rate"
|
||||
autoComplete="off"
|
||||
/>
|
||||
<p style={{ fontSize: 12, color: 'var(--text3)', margin: '6px 0 0' }}>
|
||||
<p style={{ fontSize: 12, color: 'var(--text3)', margin: '4px 0 0', textAlign: 'left' }}>
|
||||
Kleinbuchstaben, Ziffern, Unterstriche; nach Anlage nicht änderbar.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-admin-label">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-admin-label">
|
||||
Anzeigename
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -229,8 +229,8 @@ export default function AdminReferenceValueTypesPage() {
|
|||
placeholder="z. B. Maximale Herzfrequenz"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-admin-desc">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-admin-desc">
|
||||
Beschreibung
|
||||
</label>
|
||||
<textarea
|
||||
|
|
@ -242,9 +242,8 @@ export default function AdminReferenceValueTypesPage() {
|
|||
placeholder="Kurze Erklärung für Nutzer und Admins"
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 12, flexWrap: 'wrap' }}>
|
||||
<div style={{ flex: '1 1 160px' }}>
|
||||
<label className="form-label" htmlFor="ref-admin-unit">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-admin-unit">
|
||||
Standard-Einheit
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -255,8 +254,8 @@ export default function AdminReferenceValueTypesPage() {
|
|||
placeholder="bpm, Stufe, …"
|
||||
/>
|
||||
</div>
|
||||
<div style={{ flex: '0 0 120px' }}>
|
||||
<label className="form-label" htmlFor="ref-admin-sort">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-admin-sort">
|
||||
Sortierung
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -267,19 +266,32 @@ export default function AdminReferenceValueTypesPage() {
|
|||
onChange={(e) => setForm((f) => ({ ...f, sort_order: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ flex: '0 0 140px', alignSelf: 'flex-end', paddingBottom: 4 }}>
|
||||
<label style={{ display: 'flex', alignItems: 'center', gap: 8, cursor: 'pointer', fontSize: 14 }}>
|
||||
<div className="settings-page__field">
|
||||
<span className="settings-page__field-label">Sichtbarkeit</span>
|
||||
<label
|
||||
htmlFor="ref-admin-active"
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 10,
|
||||
justifyContent: 'flex-start',
|
||||
cursor: 'pointer',
|
||||
fontSize: 14,
|
||||
color: 'var(--text1)',
|
||||
textAlign: 'left',
|
||||
}}
|
||||
>
|
||||
<input
|
||||
id="ref-admin-active"
|
||||
type="checkbox"
|
||||
checked={form.active}
|
||||
onChange={(e) => setForm((f) => ({ ...f, active: e.target.checked }))}
|
||||
/>
|
||||
Aktiv (nutzer sichtbar)
|
||||
Aktiv (für Nutzer sichtbar)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-admin-meta">
|
||||
<div className="settings-page__field" style={{ borderBottom: 'none' }}>
|
||||
<label className="settings-page__field-label" htmlFor="ref-admin-meta">
|
||||
Metadaten (JSON-Objekt)
|
||||
</label>
|
||||
<textarea
|
||||
|
|
@ -288,16 +300,16 @@ export default function AdminReferenceValueTypesPage() {
|
|||
rows={5}
|
||||
value={form.metadata_json}
|
||||
onChange={(e) => setForm((f) => ({ ...f, metadata_json: e.target.value }))}
|
||||
placeholder='{}'
|
||||
placeholder="{}"
|
||||
spellCheck={false}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 8 }}>
|
||||
<button type="button" className="btn btn-primary" onClick={handleSave}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8, marginTop: 8 }}>
|
||||
<button type="button" className="btn btn-primary btn-full" onClick={handleSave}>
|
||||
<Save size={16} style={{ marginRight: 6 }} />
|
||||
Speichern
|
||||
</button>
|
||||
<button type="button" className="btn btn-secondary" onClick={closeForm}>
|
||||
<button type="button" className="btn btn-secondary btn-full" onClick={closeForm}>
|
||||
Abbrechen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ export default function ProfileReferenceValuesPage() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div style={{ paddingBottom: 88 }}>
|
||||
<div style={{ paddingBottom: 88, textAlign: 'left' }}>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Link
|
||||
to="/settings"
|
||||
|
|
@ -216,7 +216,8 @@ export default function ProfileReferenceValuesPage() {
|
|||
<>
|
||||
<div className="card section-gap">
|
||||
<div className="card-title">Referenztyp</div>
|
||||
<label className="form-label" htmlFor="ref-type-select">
|
||||
<div className="settings-page__field" style={{ borderBottom: 'none', paddingTop: 0 }}>
|
||||
<label className="settings-page__field-label" htmlFor="ref-type-select">
|
||||
Wähle einen Kennwert
|
||||
</label>
|
||||
<select
|
||||
|
|
@ -234,6 +235,7 @@ export default function ProfileReferenceValuesPage() {
|
|||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
{selectedType?.description && (
|
||||
<p style={{ fontSize: 13, color: 'var(--text2)', marginTop: 10, lineHeight: 1.5 }}>
|
||||
{selectedType.description}
|
||||
|
|
@ -247,9 +249,8 @@ export default function ProfileReferenceValuesPage() {
|
|||
{editingId ? 'Eintrag bearbeiten' : 'Neuer Eintrag'}
|
||||
</div>
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className="form-row" style={{ flexDirection: 'column', gap: 12 }}>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-date">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-date">
|
||||
Datum
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -261,8 +262,8 @@ export default function ProfileReferenceValuesPage() {
|
|||
onChange={(e) => setForm((f) => ({ ...f, effective_date: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-value">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-value">
|
||||
Wert
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -274,8 +275,8 @@ export default function ProfileReferenceValuesPage() {
|
|||
onChange={(e) => setForm((f) => ({ ...f, value: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-unit">
|
||||
<div className="settings-page__field">
|
||||
<label className="settings-page__field-label" htmlFor="ref-unit">
|
||||
Einheit
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -287,26 +288,25 @@ export default function ProfileReferenceValuesPage() {
|
|||
onChange={(e) => setForm((f) => ({ ...f, unit: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="form-label" htmlFor="ref-notes">
|
||||
<div className="settings-page__field" style={{ borderBottom: 'none' }}>
|
||||
<label className="settings-page__field-label" htmlFor="ref-notes">
|
||||
Notiz (optional)
|
||||
</label>
|
||||
<textarea
|
||||
id="ref-notes"
|
||||
className="form-input"
|
||||
rows={2}
|
||||
rows={3}
|
||||
value={form.notes}
|
||||
onChange={(e) => setForm((f) => ({ ...f, notes: e.target.value }))}
|
||||
placeholder="Kontext, Messmethode …"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 8, marginTop: 14, flexWrap: 'wrap' }}>
|
||||
<button type="submit" className="btn btn-primary" style={{ flex: 1, minWidth: 120 }}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8, marginTop: 8 }}>
|
||||
<button type="submit" className="btn btn-primary btn-full">
|
||||
{editingId ? 'Speichern' : 'Hinzufügen'}
|
||||
</button>
|
||||
{editingId && (
|
||||
<button type="button" className="btn btn-secondary" onClick={resetForm}>
|
||||
<button type="button" className="btn btn-secondary btn-full" onClick={resetForm}>
|
||||
Abbrechen
|
||||
</button>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user