Files
HealthLog/src/components/settings/anamnesis-section.tsx
T
Marc-André Bombeck 9f21d9f20d fix(cards): retire banned p-5 shells and accent header icons
Bring the structural card-anatomy offenders onto the spacing scale. The
cycle wellness-tile family (ring tile, phase-education, insight summary,
cycle view) and the insights wellness-scores tile drop banned p-5/px-5
py-5 for p-4 md:p-6 and keep their premium hue surface; their header and
info glyphs move off text-primary to foreground, spinners to muted. The
onboarding hand-rolled shells (anamnesis card, baseline form,
getting-started checklist, tour tooltip) drop p-5/space-y-5/rounded-2xl
for p-4 md:p-6/space-y-4/rounded-xl. settings/anamnesis-section moves its
three raw Card+CardTitle shells onto SettingsCard + SettingsCardHeader.
2026-07-09 12:05:34 +02:00

70 lines
2.6 KiB
TypeScript

"use client";
/**
* v1.25 (W-RECORDS) — Settings → Anamnese (medical history).
*
* The home for the structured health records: allergies / intolerances and
* family history. Each is a self-contained CRUD manager rendered in its own
* card. These are patient-reported reference records — not a time-series
* signal and not a clinical diagnosis — surfaced alongside the existing
* tracking-domain settings sections (Labs / Illness / Vorsorge).
*
* v1.25.12 — the section is the single home for the pre-existing / chronic
* conditions the Coach watches, edited inline here so conditions + allergies +
* family history read (and write) as one coherent medical history. The
* conditions card is coach-gated (the data only feeds the Coach); it reads and
* writes the same self-context store (`/api/coach/about-me`) the rest of the app
* uses — the placement simply moved out of personal context into the medical
* record where it belongs.
*/
import { HeartPulse, ShieldAlert, Users } from "lucide-react";
import { SettingsCard } from "@/components/settings/settings-card";
import { SettingsCardHeader } from "@/components/settings/_card-header";
import { useTranslations } from "@/lib/i18n/context";
import { useModuleEnabled } from "@/hooks/use-module-enabled";
import { AllergyManager } from "@/components/records/allergy-manager";
import { ConditionsManager } from "@/components/records/conditions-manager";
import { FamilyHistoryManager } from "@/components/records/family-history-manager";
export function AnamnesisSection() {
const { t } = useTranslations();
const coachEnabled = useModuleEnabled("coach");
return (
<div className="space-y-6">
{coachEnabled && (
<SettingsCard className="space-y-4">
<SettingsCardHeader
icon={HeartPulse}
title={t("records.conditions.cardTitle")}
description={t("records.conditions.cardDescription")}
/>
<ConditionsManager />
</SettingsCard>
)}
<SettingsCard className="space-y-4">
<SettingsCardHeader
icon={ShieldAlert}
title={t("records.allergies.cardTitle")}
description={t("records.allergies.cardDescription")}
/>
<AllergyManager />
</SettingsCard>
<SettingsCard className="space-y-4">
<SettingsCardHeader
icon={Users}
title={t("records.family.cardTitle")}
description={t("records.family.cardDescription")}
/>
<FamilyHistoryManager />
</SettingsCard>
<p className="text-muted-foreground text-xs">{t("records.disclaimer")}</p>
</div>
);
}