+ {t("records.conditions.loadError")} +
+ )} + + {!isLoading && !isError && ( + <> + {hasAny ? ( ++ {t("records.conditions.empty")} +
+ )} + ++ + {t("records.conditions.editCta")} + +
+ > + )} +{t("settings.ai.aboutMe.hint")} {t("settings.ai.aboutMe.profileHint")}
+ + {/* v1.25.1 — cross-link to the Anamnese (medical-history) home. The + chronic conditions noted above plus allergies + family history read as + one coherent medical history there. */} ++ {t("settings.ai.aboutMe.recordsLink")}{" "} + + {t("settings.ai.aboutMe.recordsLinkCta")} + +
); } diff --git a/src/components/settings/anamnesis-section.tsx b/src/components/settings/anamnesis-section.tsx index 546e10384..6b4cfe942 100644 --- a/src/components/settings/anamnesis-section.tsx +++ b/src/components/settings/anamnesis-section.tsx @@ -8,6 +8,13 @@ * 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.1 — the section also surfaces the pre-existing / chronic conditions the + * Coach watches (the self-context entered under Profile → "About me") as a + * read-only shared view, so conditions + allergies + family history read as one + * coherent medical history. The conditions card is coach-gated (the data only + * feeds the Coach) and links back to its single editing home in personal + * context. */ import { @@ -18,14 +25,31 @@ import { CardTitle, } from "@/components/ui/card"; import { useTranslations } from "@/lib/i18n/context"; +import { useModuleEnabled } from "@/hooks/use-module-enabled"; import { AllergyManager } from "@/components/records/allergy-manager"; +import { ConditionsOverview } from "@/components/records/conditions-overview"; import { FamilyHistoryManager } from "@/components/records/family-history-manager"; export function AnamnesisSection() { const { t } = useTranslations(); + const coachEnabled = useModuleEnabled("coach"); return ({t("settings.security.activityDescription")}
diff --git a/src/components/settings/security-sessions-card.tsx b/src/components/settings/security-sessions-card.tsx index 77f98cabb..24d969551 100644 --- a/src/components/settings/security-sessions-card.tsx +++ b/src/components/settings/security-sessions-card.tsx @@ -9,16 +9,16 @@ * session (and native device logins) while keeping the current one. All reads * + writes route through the centralised query-key factory. */ -import { useState } from "react"; +import { useId, useState } from "react"; import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; -import { Loader2, MonitorSmartphone } from "lucide-react"; +import { ChevronDown, Loader2, MonitorSmartphone } from "lucide-react"; import { Button } from "@/components/ui/button"; import { SettingsCard } from "@/components/settings/settings-card"; -import { SettingsCardHeader } from "@/components/settings/_card-header"; import { useTranslations } from "@/lib/i18n/context"; import { queryKeys } from "@/lib/query-keys"; import { apiGet, apiDelete } from "@/lib/api/api-fetch"; +import { cn } from "@/lib/utils"; interface SessionRow { id: string; @@ -38,6 +38,11 @@ export function SecuritySessionsCard({ const { t } = useTranslations(); const queryClient = useQueryClient(); const [status, setStatus] = useState{t("settings.security.sessionsDescription")}