From 43d9610f0361fcdc563b3e156c5c20ed24cd33a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 19 Jun 2026 21:06:25 +0200 Subject: [PATCH] refactor(settings): fold Labs, Vorsorge, and Illness into the shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Promote the three per-module customise surfaces from standalone ModuleSettingsFrame pages to first-class Settings sections. They now render inside the Settings shell — same left nav, heading, and chrome as account / ai / integrations / notifications — instead of their own back-button-and-title frame outside it. Add labs, illness, and vorsorge to the slug registry (after mood) and to SETTINGS_SECTIONS with FlaskConical / Thermometer / CalendarCheck icons. labs and illness gate on their toggleable modules; vorsorge has no module, so its entry is always shown. Three thin section components wrap the existing LabsSettings / IllnessSettings / VorsorgeSettings content, mirroring MedicationsSection / CoachSection. Delete the three standalone /settings/{labs,vorsorge,illness} routes so the wrench deep links resolve through the dynamic [section] route, and drop ModuleSettingsFrame now that nothing renders it. Add the section title / subtitle / description keys across all six locales and remove the dead per-module *.settings.* blocks the old pages consumed. --- messages/de.json | 30 ++++++------- messages/en.json | 30 ++++++------- messages/es.json | 30 ++++++------- messages/fr.json | 30 ++++++------- messages/it.json | 30 ++++++------- messages/pl.json | 30 ++++++------- src/app/settings/[section]/page.tsx | 6 +++ src/app/settings/illness/page.tsx | 39 ----------------- src/app/settings/labs/page.tsx | 39 ----------------- src/app/settings/vorsorge/page.tsx | 43 ------------------- .../module-list/module-settings-frame.tsx | 42 ------------------ .../__tests__/settings-shell.test.tsx | 6 +++ src/components/settings/illness-section.tsx | 21 +++++++++ src/components/settings/labs-section.tsx | 22 ++++++++++ .../settings/section-placeholder.tsx | 6 +++ src/components/settings/section-slugs.ts | 13 ++++++ src/components/settings/settings-shell.tsx | 31 +++++++++++++ src/components/settings/vorsorge-section.tsx | 22 ++++++++++ 18 files changed, 217 insertions(+), 253 deletions(-) delete mode 100644 src/app/settings/illness/page.tsx delete mode 100644 src/app/settings/labs/page.tsx delete mode 100644 src/app/settings/vorsorge/page.tsx delete mode 100644 src/components/module-list/module-settings-frame.tsx create mode 100644 src/components/settings/illness-section.tsx create mode 100644 src/components/settings/labs-section.tsx create mode 100644 src/components/settings/vorsorge-section.tsx diff --git a/messages/de.json b/messages/de.json index 3ce0ec929..a70f807a6 100644 --- a/messages/de.json +++ b/messages/de.json @@ -4025,6 +4025,21 @@ "description": "Gruppen, Tags und archivierte Tags der Stimmungs-Auswahl.", "subtitle": "Organisiere deine Stimmungs-Tags, Gruppen und Auswahlreihenfolge." }, + "labs": { + "title": "Laborwerte", + "description": "Ansicht, Sortierung und Biomarker deiner Laborwerte.", + "subtitle": "Ansicht, Sortierung und Biomarker verwalten." + }, + "illness": { + "title": "Krankheitstagebuch", + "description": "Ansicht und Reihenfolge deiner Krankheitsepisoden.", + "subtitle": "Ansicht und Reihenfolge der Episoden verwalten." + }, + "vorsorge": { + "title": "Vorsorge", + "description": "Ansicht, Reihenfolge und einzelne Vorsorge-Erinnerungen.", + "subtitle": "Ansicht, Reihenfolge und einzelne Erinnerungen verwalten." + }, "modules": { "title": "Module", "saved": "Gespeichert.", @@ -6407,11 +6422,6 @@ "onTrack": "Im Plan", "due": "Jetzt fällig" }, - "settings": { - "title": "Vorsorge anpassen", - "description": "Ansicht, Reihenfolge und einzelne Erinnerungen verwalten.", - "back": "Zurück zur Vorsorge" - }, "capture": { "title": "Messwert erfassen", "description": "Wert eintragen; die Erinnerung wird als erledigt markiert." @@ -6461,11 +6471,6 @@ "deleteError": "Wert konnte nicht gelöscht werden", "loadError": "Laborwerte konnten nicht geladen werden", "customize": "Laborwerte anpassen", - "settings": { - "title": "Laborwerte anpassen", - "description": "Ansicht, Sortierung und Biomarker verwalten.", - "back": "Zurück zu den Laborwerten" - }, "sort": { "heading": "Sortierung", "label": "Reihenfolge der Werte", @@ -6664,11 +6669,6 @@ "title": "Krankheitstagebuch", "subtitle": "Ein rückblickendes Protokoll deiner Krankheits- und Beschwerde-Episoden.", "customize": "Krankheitstagebuch anpassen", - "settings": { - "title": "Krankheitstagebuch anpassen", - "description": "Ansicht und Reihenfolge der Episoden verwalten.", - "back": "Zurück zum Krankheitstagebuch" - }, "newEpisode": "Neue Episode", "logDay": "Tag erfassen", "markRecovered": "Als genesen markieren", diff --git a/messages/en.json b/messages/en.json index 535db02d5..551a46efe 100644 --- a/messages/en.json +++ b/messages/en.json @@ -4025,6 +4025,21 @@ "description": "Groups, tags, and archived tags for the mood picker.", "subtitle": "Organize your mood tags, groups, and picker order." }, + "labs": { + "title": "Labs", + "description": "View, sort order, and biomarkers for your labs.", + "subtitle": "Manage the view, sort order, and biomarkers." + }, + "illness": { + "title": "Illness journal", + "description": "View and order of your illness episodes.", + "subtitle": "Manage the view and order of episodes." + }, + "vorsorge": { + "title": "Preventive care", + "description": "View, order, and individual preventive-care reminders.", + "subtitle": "Manage the view, order, and individual reminders." + }, "modules": { "title": "Modules", "saved": "Saved.", @@ -6407,11 +6422,6 @@ "onTrack": "On track", "due": "Due now" }, - "settings": { - "title": "Customize preventive care", - "description": "Manage the view, order, and individual reminders.", - "back": "Back to preventive care" - }, "capture": { "title": "Log measurement", "description": "Enter the reading; the reminder is marked done." @@ -6461,11 +6471,6 @@ "deleteError": "Could not delete the result", "loadError": "Could not load lab results", "customize": "Customize labs", - "settings": { - "title": "Customize labs", - "description": "Manage the view, sort order, and biomarkers.", - "back": "Back to labs" - }, "sort": { "heading": "Sort order", "label": "Order of values", @@ -6664,11 +6669,6 @@ "title": "Illness journal", "subtitle": "A retrospective log of your illness and condition episodes.", "customize": "Customize illness journal", - "settings": { - "title": "Customize illness journal", - "description": "Manage the view and order of episodes.", - "back": "Back to the illness journal" - }, "newEpisode": "New episode", "logDay": "Log a day", "markRecovered": "Mark recovered", diff --git a/messages/es.json b/messages/es.json index 15ed8347c..c4c7cc722 100644 --- a/messages/es.json +++ b/messages/es.json @@ -4025,6 +4025,21 @@ "description": "Grupos, etiquetas y etiquetas archivadas del selector de ánimo.", "subtitle": "Organiza tus etiquetas de ánimo, grupos y orden del selector." }, + "labs": { + "title": "Laboratorio", + "description": "Vista, orden y biomarcadores de tu laboratorio.", + "subtitle": "Gestiona la vista, el orden y los biomarcadores." + }, + "illness": { + "title": "Diario de enfermedad", + "description": "Vista y orden de tus episodios de enfermedad.", + "subtitle": "Gestiona la vista y el orden de los episodios." + }, + "vorsorge": { + "title": "Prevención", + "description": "Vista, orden y recordatorios de prevención individuales.", + "subtitle": "Gestiona la vista, el orden y los recordatorios individuales." + }, "modules": { "title": "Módulos", "saved": "Guardado.", @@ -6407,11 +6422,6 @@ "onTrack": "Al día", "due": "Toca ahora" }, - "settings": { - "title": "Personalizar prevención", - "description": "Gestiona la vista, el orden y los recordatorios individuales.", - "back": "Volver a prevención" - }, "capture": { "title": "Registrar medición", "description": "Introduce el valor; el recordatorio se marca como hecho." @@ -6461,11 +6471,6 @@ "deleteError": "No se pudo eliminar el resultado", "loadError": "No se pudieron cargar los resultados", "customize": "Personalizar laboratorio", - "settings": { - "title": "Personalizar laboratorio", - "description": "Gestiona la vista, el orden y los biomarcadores.", - "back": "Volver al laboratorio" - }, "sort": { "heading": "Orden", "label": "Orden de los valores", @@ -6664,11 +6669,6 @@ "title": "Diario de enfermedad", "subtitle": "Un registro retrospectivo de tus episodios de enfermedad y dolencias.", "customize": "Personalizar diario de enfermedad", - "settings": { - "title": "Personalizar diario de enfermedad", - "description": "Gestiona la vista y el orden de los episodios.", - "back": "Volver al diario de enfermedad" - }, "newEpisode": "Nuevo episodio", "logDay": "Registrar un día", "markRecovered": "Marcar como recuperado", diff --git a/messages/fr.json b/messages/fr.json index c2ce0dfc7..532b2cbf9 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -4025,6 +4025,21 @@ "description": "Groupes, étiquettes et étiquettes archivées du sélecteur d’humeur.", "subtitle": "Organisez vos tags d'humeur, groupes et ordre du sélecteur." }, + "labs": { + "title": "Analyses", + "description": "Affichage, tri et biomarqueurs de vos analyses.", + "subtitle": "Gérez l’affichage, le tri et les biomarqueurs." + }, + "illness": { + "title": "Journal de maladie", + "description": "Affichage et ordre de vos épisodes de maladie.", + "subtitle": "Gérez l’affichage et l’ordre des épisodes." + }, + "vorsorge": { + "title": "Prévention", + "description": "Affichage, ordre et rappels de prévention individuels.", + "subtitle": "Gérez l’affichage, l’ordre et les rappels individuels." + }, "modules": { "title": "Modules", "saved": "Enregistré.", @@ -6407,11 +6422,6 @@ "onTrack": "Dans les temps", "due": "À faire maintenant" }, - "settings": { - "title": "Personnaliser la prévention", - "description": "Gérer l'affichage, l'ordre et les rappels individuels.", - "back": "Retour à la prévention" - }, "capture": { "title": "Enregistrer une mesure", "description": "Saisissez la valeur ; le rappel est marqué comme fait." @@ -6461,11 +6471,6 @@ "deleteError": "Impossible de supprimer le résultat", "loadError": "Impossible de charger les résultats", "customize": "Personnaliser les analyses", - "settings": { - "title": "Personnaliser les analyses", - "description": "Gérer l'affichage, le tri et les biomarqueurs.", - "back": "Retour aux analyses" - }, "sort": { "heading": "Tri", "label": "Ordre des valeurs", @@ -6664,11 +6669,6 @@ "title": "Journal de maladie", "subtitle": "Un suivi rétrospectif de vos épisodes de maladie et d'affections.", "customize": "Personnaliser le journal de maladie", - "settings": { - "title": "Personnaliser le journal de maladie", - "description": "Gérer l'affichage et l'ordre des épisodes.", - "back": "Retour au journal de maladie" - }, "newEpisode": "Nouvel épisode", "logDay": "Enregistrer un jour", "markRecovered": "Marquer comme rétabli", diff --git a/messages/it.json b/messages/it.json index 86edcbc3c..0e28f4af2 100644 --- a/messages/it.json +++ b/messages/it.json @@ -4025,6 +4025,21 @@ "description": "Gruppi, tag e tag archiviati del selettore dell’umore.", "subtitle": "Organizza i tag dell'umore, i gruppi e l'ordine del selettore." }, + "labs": { + "title": "Esami", + "description": "Vista, ordinamento e biomarcatori dei tuoi esami.", + "subtitle": "Gestisci la vista, l’ordinamento e i biomarcatori." + }, + "illness": { + "title": "Diario delle malattie", + "description": "Vista e ordine dei tuoi episodi di malattia.", + "subtitle": "Gestisci la vista e l’ordine degli episodi." + }, + "vorsorge": { + "title": "Prevenzione", + "description": "Vista, ordine e singoli promemoria di prevenzione.", + "subtitle": "Gestisci la vista, l’ordine e i singoli promemoria." + }, "modules": { "title": "Moduli", "saved": "Salvato.", @@ -6407,11 +6422,6 @@ "onTrack": "In linea", "due": "Da fare ora" }, - "settings": { - "title": "Personalizza prevenzione", - "description": "Gestisci la vista, l'ordine e i singoli promemoria.", - "back": "Torna alla prevenzione" - }, "capture": { "title": "Registra misurazione", "description": "Inserisci il valore; il promemoria viene segnato come fatto." @@ -6461,11 +6471,6 @@ "deleteError": "Impossibile eliminare il risultato", "loadError": "Impossibile caricare i risultati", "customize": "Personalizza esami", - "settings": { - "title": "Personalizza esami", - "description": "Gestisci la vista, l'ordinamento e i biomarcatori.", - "back": "Torna agli esami" - }, "sort": { "heading": "Ordinamento", "label": "Ordine dei valori", @@ -6664,11 +6669,6 @@ "title": "Diario delle malattie", "subtitle": "Un registro retrospettivo dei tuoi episodi di malattia e disturbi.", "customize": "Personalizza diario delle malattie", - "settings": { - "title": "Personalizza diario delle malattie", - "description": "Gestisci la vista e l'ordine degli episodi.", - "back": "Torna al diario delle malattie" - }, "newEpisode": "Nuovo episodio", "logDay": "Registra un giorno", "markRecovered": "Segna come guarito", diff --git a/messages/pl.json b/messages/pl.json index f6a65b1f4..b528246d6 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -4025,6 +4025,21 @@ "description": "Grupy, tagi i zarchiwizowane tagi w wyborze nastroju.", "subtitle": "Uporządkuj tagi nastroju, grupy i kolejność wyboru." }, + "labs": { + "title": "Wyniki badań", + "description": "Widok, sortowanie i biomarkery Twoich wyników badań.", + "subtitle": "Zarządzaj widokiem, sortowaniem i biomarkerami." + }, + "illness": { + "title": "Dziennik chorób", + "description": "Widok i kolejność Twoich epizodów chorobowych.", + "subtitle": "Zarządzaj widokiem i kolejnością epizodów." + }, + "vorsorge": { + "title": "Profilaktyka", + "description": "Widok, kolejność i poszczególne przypomnienia profilaktyczne.", + "subtitle": "Zarządzaj widokiem, kolejnością i poszczególnymi przypomnieniami." + }, "modules": { "title": "Moduły", "saved": "Zapisano.", @@ -6407,11 +6422,6 @@ "onTrack": "Zgodnie z planem", "due": "Termin teraz" }, - "settings": { - "title": "Dostosuj profilaktykę", - "description": "Zarządzaj widokiem, kolejnością i poszczególnymi przypomnieniami.", - "back": "Powrót do profilaktyki" - }, "capture": { "title": "Zapisz pomiar", "description": "Wpisz wartość; przypomnienie zostanie oznaczone jako wykonane." @@ -6461,11 +6471,6 @@ "deleteError": "Nie udało się usunąć wyniku", "loadError": "Nie udało się wczytać wyników", "customize": "Dostosuj wyniki badań", - "settings": { - "title": "Dostosuj wyniki badań", - "description": "Zarządzaj widokiem, sortowaniem i biomarkerami.", - "back": "Powrót do wyników badań" - }, "sort": { "heading": "Sortowanie", "label": "Kolejność wartości", @@ -6664,11 +6669,6 @@ "title": "Dziennik chorób", "subtitle": "Retrospektywny zapis Twoich epizodów chorób i dolegliwości.", "customize": "Dostosuj dziennik chorób", - "settings": { - "title": "Dostosuj dziennik chorób", - "description": "Zarządzaj widokiem i kolejnością epizodów.", - "back": "Powrót do dziennika chorób" - }, "newEpisode": "Nowy epizod", "logDay": "Zapisz dzień", "markRecovered": "Oznacz jako wyleczone", diff --git a/src/app/settings/[section]/page.tsx b/src/app/settings/[section]/page.tsx index dd3e9159d..4b5c1a3f0 100644 --- a/src/app/settings/[section]/page.tsx +++ b/src/app/settings/[section]/page.tsx @@ -10,14 +10,17 @@ import { CoachSection } from "@/components/settings/coach-section"; import { DashboardSection } from "@/components/settings/dashboard-section"; import { ExportSection } from "@/components/settings/export-section"; import { GesundheitsakteSection } from "@/components/settings/gesundheitsakte-section"; +import { IllnessSection } from "@/components/settings/illness-section"; import { InsightsSection } from "@/components/settings/insights-section"; import { IntegrationsSection } from "@/components/settings/integrations-section"; +import { LabsSection } from "@/components/settings/labs-section"; import { LayoutSection } from "@/components/settings/layout-section"; import { MedicationsSection } from "@/components/settings/medications-section"; import { ModulesSection } from "@/components/settings/modules-section"; import { MoodSection } from "@/components/settings/mood-section"; import { NotificationsSection } from "@/components/settings/notifications-section"; import { SectionPlaceholder } from "@/components/settings/section-placeholder"; +import { VorsorgeSection } from "@/components/settings/vorsorge-section"; // v1.18.1 (D4) — `channels` and `sources` are standalone left-side entries // again (split out of the Integrations sub-tabs). import { ChannelsSection } from "@/components/settings/channels-section"; @@ -64,6 +67,9 @@ const SECTION_COMPONENTS: Record< insights: InsightsSection, medications: MedicationsSection, mood: MoodSection, + labs: LabsSection, + illness: IllnessSection, + vorsorge: VorsorgeSection, thresholds: ThresholdsSection, api: ApiSection, gesundheitsakte: GesundheitsakteSection, diff --git a/src/app/settings/illness/page.tsx b/src/app/settings/illness/page.tsx deleted file mode 100644 index b6b37b890..000000000 --- a/src/app/settings/illness/page.tsx +++ /dev/null @@ -1,39 +0,0 @@ -"use client"; - -import { Loader2 } from "lucide-react"; - -import { useAuth } from "@/hooks/use-auth"; -import { useMounted } from "@/hooks/use-mounted"; -import { useTranslations } from "@/lib/i18n/context"; -import { ModuleSettingsFrame } from "@/components/module-list/module-settings-frame"; -import { IllnessSettings } from "@/components/illness/illness-settings"; - -/** - * v1.18.6 (W8 / MOD-03) — the Illness module's own settings page. Dedicated - * static route (wins over `/settings/[section]`); reached from the wrench - * beside the Illness page's "hinzufügen" button. - */ -export default function IllnessSettingsPage() { - const { isLoading } = useAuth(); - const mounted = useMounted(); - const { t } = useTranslations(); - - if (!mounted || isLoading) { - return ( -
- -
- ); - } - - return ( - - - - ); -} diff --git a/src/app/settings/labs/page.tsx b/src/app/settings/labs/page.tsx deleted file mode 100644 index 5805b5fa9..000000000 --- a/src/app/settings/labs/page.tsx +++ /dev/null @@ -1,39 +0,0 @@ -"use client"; - -import { Loader2 } from "lucide-react"; - -import { useAuth } from "@/hooks/use-auth"; -import { useMounted } from "@/hooks/use-mounted"; -import { useTranslations } from "@/lib/i18n/context"; -import { ModuleSettingsFrame } from "@/components/module-list/module-settings-frame"; -import { LabsSettings } from "@/components/labs/labs-settings"; - -/** - * v1.18.6 (W8 / MOD-03 + MOD-04) — the Labs module's own settings page. - * Dedicated static route (wins over `/settings/[section]`); reached from the - * wrench beside the Labs page's "hinzufügen" button. - */ -export default function LabsSettingsPage() { - const { isLoading } = useAuth(); - const mounted = useMounted(); - const { t } = useTranslations(); - - if (!mounted || isLoading) { - return ( -
- -
- ); - } - - return ( - - - - ); -} diff --git a/src/app/settings/vorsorge/page.tsx b/src/app/settings/vorsorge/page.tsx deleted file mode 100644 index 147b3d51f..000000000 --- a/src/app/settings/vorsorge/page.tsx +++ /dev/null @@ -1,43 +0,0 @@ -"use client"; - -import { Loader2 } from "lucide-react"; - -import { useAuth } from "@/hooks/use-auth"; -import { useMounted } from "@/hooks/use-mounted"; -import { useTranslations } from "@/lib/i18n/context"; -import { ModuleSettingsFrame } from "@/components/module-list/module-settings-frame"; -import { VorsorgeSettings } from "@/components/measurement-reminders/vorsorge-settings"; - -/** - * v1.18.6 (W8 / MOD-03) — the Vorsorge module's own settings page. - * - * A dedicated static route that wins over the dynamic `/settings/[section]` - * router (static segments take precedence in Next.js), so it adds a - * per-module settings surface without touching the parallel-phase-owned - * `section-slugs` registry or `settings-shell`. Reached from the wrench - * beside the Vorsorge page's "hinzufügen" button. - */ -export default function VorsorgeSettingsPage() { - const { isLoading } = useAuth(); - const mounted = useMounted(); - const { t } = useTranslations(); - - if (!mounted || isLoading) { - return ( -
- -
- ); - } - - return ( - - - - ); -} diff --git a/src/components/module-list/module-settings-frame.tsx b/src/components/module-list/module-settings-frame.tsx deleted file mode 100644 index 4d2959b19..000000000 --- a/src/components/module-list/module-settings-frame.tsx +++ /dev/null @@ -1,42 +0,0 @@ -"use client"; - -import type { ReactNode } from "react"; - -import { SettingsHubBackLink } from "@/components/settings/settings-hub-back-link"; -import { SettingsSectionFrame } from "@/components/settings/settings-section-frame"; - -/** - * v1.18.6 (W8 / MOD-03) — heading frame for the per-module settings pages - * (Vorsorge / Illness / Labs). - * - * Delegates to the shared `SettingsSectionFrame` so every settings page — the - * 19 shell sections and these three per-module pages — renders one identical - * heading frame. These pages stay out of the slug registry (their static - * routes win over `/settings/[section]`), so they drive the frame's explicit - * title/subtitle mode and supply the "return to the module" back-link through - * the frame's `topSlot`, which sits above the heading. - */ -export function ModuleSettingsFrame({ - title, - description, - backHref, - backLabelKey, - children, -}: { - title: string; - description: string; - /** Where the "← back" link returns to — the module's own page. */ - backHref: string; - backLabelKey: string; - children: ReactNode; -}) { - return ( - } - > - {children} - - ); -} diff --git a/src/components/settings/__tests__/settings-shell.test.tsx b/src/components/settings/__tests__/settings-shell.test.tsx index 24caa863b..19b600232 100644 --- a/src/components/settings/__tests__/settings-shell.test.tsx +++ b/src/components/settings/__tests__/settings-shell.test.tsx @@ -91,6 +91,9 @@ describe("SETTINGS_SECTION_SLUGS", () => { // sits right after `ai`. // v1.18.1 (D4) — `channels` + `sources` split out of the Integrations // sub-tabs into their own left-side entries, right after `integrations`. + // v1.18.7 — `labs`, `illness`, `vorsorge` move into the shell as + // first-class sections, right after `mood` (the three were standalone + // `ModuleSettingsFrame` pages). expect([...SETTINGS_SECTION_SLUGS]).toEqual([ "account", "modules", @@ -103,6 +106,9 @@ describe("SETTINGS_SECTION_SLUGS", () => { "insights", "medications", "mood", + "labs", + "illness", + "vorsorge", "thresholds", "ai", "coach", diff --git a/src/components/settings/illness-section.tsx b/src/components/settings/illness-section.tsx new file mode 100644 index 000000000..214bd7784 --- /dev/null +++ b/src/components/settings/illness-section.tsx @@ -0,0 +1,21 @@ +"use client"; + +/** + * v1.18.7 — Settings → Krankheitstagebuch. + * + * The illness-journal customise surface (list view + episode order) was a + * standalone `ModuleSettingsFrame` page at `/settings/illness`; it now + * renders as a first-class Settings section. The shell supplies the page + * chrome (left nav, heading, subtitle) so this body is the illness cards + * only. The nav entry is module-gated on `illness`. + */ + +import { IllnessSettings } from "@/components/illness/illness-settings"; + +export function IllnessSection() { + return ( +
+ +
+ ); +} diff --git a/src/components/settings/labs-section.tsx b/src/components/settings/labs-section.tsx new file mode 100644 index 000000000..883da6d4c --- /dev/null +++ b/src/components/settings/labs-section.tsx @@ -0,0 +1,22 @@ +"use client"; + +/** + * v1.18.7 — Settings → Labor. + * + * The labs customise surface (list view, sort order, biomarker management) + * was a standalone `ModuleSettingsFrame` page at `/settings/labs`; it now + * renders as a first-class Settings section. The shell supplies the page + * chrome (left nav, heading, subtitle) so this body is the labs cards only — + * the same pattern the other module-gated sections (Medikamente, Coach, + * Stimmung) follow. The nav entry is module-gated on `labs`. + */ + +import { LabsSettings } from "@/components/labs/labs-settings"; + +export function LabsSection() { + return ( +
+ +
+ ); +} diff --git a/src/components/settings/section-placeholder.tsx b/src/components/settings/section-placeholder.tsx index 4877945bf..3a56bdbb4 100644 --- a/src/components/settings/section-placeholder.tsx +++ b/src/components/settings/section-placeholder.tsx @@ -15,8 +15,10 @@ import { Bell, Blocks, Bot, + CalendarCheck, Download, FileHeart, + FlaskConical, Info, KeyRound, Layers, @@ -28,6 +30,7 @@ import { SlidersHorizontal, Smile, Sparkles, + Thermometer, TrendingUp, User, type LucideIcon, @@ -49,6 +52,9 @@ const SLUG_ICON: Record = { insights: TrendingUp, medications: Pill, mood: Smile, + labs: FlaskConical, + illness: Thermometer, + vorsorge: CalendarCheck, thresholds: SlidersHorizontal, ai: Sparkles, coach: Bot, diff --git a/src/components/settings/section-slugs.ts b/src/components/settings/section-slugs.ts index 284b05acf..80b5d3d68 100644 --- a/src/components/settings/section-slugs.ts +++ b/src/components/settings/section-slugs.ts @@ -22,6 +22,16 @@ // v1.17 — `mood` sits after `medications`: the mood-tag management // surface (groups, custom tags, hide/archive, picker order), reached // from the /mood page header's wrench glyph. +// v1.18.7 — `labs`, `illness`, and `vorsorge` move INTO the Settings +// shell as first-class sections, right after `mood`, so the three +// tracking-domain customise surfaces sit together. They were standalone +// `ModuleSettingsFrame` pages (their own back-button + title, outside the +// shell); now the dynamic `[section]` route renders them in shell chrome +// 1:1 with the other sections. The wrench deep-links (`/settings/labs`, +// `/settings/illness`, `/settings/vorsorge`) are unchanged — they now +// resolve through the shell. `labs` + `illness` are module-gated (they are +// toggleable modules); `vorsorge` (preventive-care reminders) is not a +// module, so its entry is always shown. // v1.17.1 (F-2) — `layout` is the one "Layout & Personalization" home. // The dashboard / insights / medications / mood personalization editors // each keep their own route (deep links, page-header cogs, and the hub's @@ -53,6 +63,9 @@ export const SETTINGS_SECTION_SLUGS = [ "insights", "medications", "mood", + "labs", + "illness", + "vorsorge", "thresholds", "ai", // v1.18.0 (S5) — `coach` gathers the Coach preference cards (disable diff --git a/src/components/settings/settings-shell.tsx b/src/components/settings/settings-shell.tsx index 6575b2834..0f709910a 100644 --- a/src/components/settings/settings-shell.tsx +++ b/src/components/settings/settings-shell.tsx @@ -21,8 +21,10 @@ import { Bell, Blocks, Bot, + CalendarCheck, Download, FileHeart, + FlaskConical, Info, KeyRound, LayoutDashboard, @@ -34,6 +36,7 @@ import { SlidersHorizontal, Smile, Sparkles, + Thermometer, User, type LucideIcon, } from "lucide-react"; @@ -160,6 +163,34 @@ export const SETTINGS_SECTIONS: readonly SettingsSection[] = [ icon: Smile, moduleGate: "mood", }, + // v1.18.7 — Labor: the labs customise surface (view, sort, biomarkers) + // becomes a first-class Settings section, gated on the `labs` module. Was + // a standalone `ModuleSettingsFrame` page reached from the /labs wrench. + { + slug: "labs", + titleKey: "settings.sections.labs.title", + icon: FlaskConical, + moduleGate: "labs", + }, + // v1.18.7 — Krankheitstagebuch: the illness-journal customise surface + // (view + order of episodes), gated on the `illness` module. Was a + // standalone `ModuleSettingsFrame` page reached from the /illness wrench. + { + slug: "illness", + titleKey: "settings.sections.illness.title", + icon: Thermometer, + moduleGate: "illness", + }, + // v1.18.7 — Vorsorge: the preventive-care reminders customise surface + // (view, order, individual reminders). NOT module-gated — preventive-care + // reminders are not a toggleable module — so the entry is always shown. + // Was a standalone `ModuleSettingsFrame` page reached from the /vorsorge + // wrench. + { + slug: "vorsorge", + titleKey: "settings.sections.vorsorge.title", + icon: CalendarCheck, + }, { slug: "thresholds", titleKey: "settings.sections.thresholds.title", diff --git a/src/components/settings/vorsorge-section.tsx b/src/components/settings/vorsorge-section.tsx new file mode 100644 index 000000000..e53a1c059 --- /dev/null +++ b/src/components/settings/vorsorge-section.tsx @@ -0,0 +1,22 @@ +"use client"; + +/** + * v1.18.7 — Settings → Vorsorge. + * + * The preventive-care reminders customise surface (list view, order, + * individual reminders) was a standalone `ModuleSettingsFrame` page at + * `/settings/vorsorge`; it now renders as a first-class Settings section. + * The shell supplies the page chrome (left nav, heading, subtitle) so this + * body is the preventive-care cards only. Preventive-care reminders are not + * a toggleable module, so this entry carries no `moduleGate` (always shown). + */ + +import { VorsorgeSettings } from "@/components/measurement-reminders/vorsorge-settings"; + +export function VorsorgeSection() { + return ( +
+ +
+ ); +}