diff --git a/src/components/measurement-reminders/vorsorge-section.tsx b/src/components/measurement-reminders/vorsorge-section.tsx index fef044321..0ade64e1e 100644 --- a/src/components/measurement-reminders/vorsorge-section.tsx +++ b/src/components/measurement-reminders/vorsorge-section.tsx @@ -41,7 +41,6 @@ import { import { useFormatters, useTranslations } from "@/lib/i18n/context"; import { cn } from "@/lib/utils"; import { applyOrder, useModuleListPrefs } from "@/lib/module-list-prefs"; -import { ModuleTourTrigger } from "@/components/onboarding/module-tour-trigger"; import { SettingsCardHeader } from "@/components/settings/_card-header"; import { AlertDialog, @@ -387,7 +386,6 @@ export function VorsorgeSection({

- {wrenchButton} {addButton}
@@ -766,12 +764,17 @@ function VorsorgeCard({ ? t(`measurementReminders.types.${reminder.measurementType}`) : t("measurementReminders.selfPlanned"); - // v1.18.6 (MOD-06) — the cadence renders as a chip beside the item name - // (the med-card cadence-chip convention), alongside the provenance / - // disabled state badges. - const stateBadges = ( + // v1.18.6.1 — the cadence renders as a chip DIRECTLY to the right of the + // metric name (the med-card convention: cadence sits next to the name). + const cadenceChip = cadence ? ( + {cadence} + ) : null; + + // Provenance / disabled state badges keep their own row below the category. + // Omit the row entirely when neither applies (don't render an empty band). + const hasStateBadges = isCoach || !reminder.enabled; + const stateBadges = hasStateBadges ? ( <> - {cadence && {cadence}} {isCoach && ( {t("measurementReminders.originCoach")} )} @@ -781,7 +784,7 @@ function VorsorgeCard({ )} - ); + ) : undefined; // Single med-style kebab: Edit + Delete. The Delete item is the shared // confirm-on-delete control rendered as a full-width menu row. @@ -872,17 +875,17 @@ function VorsorgeCard({
-
+
{resolveReminderLabel(reminder, t)} - {cadence && {cadence}} + {cadenceChip}
-
- +
+ {t(`measurementReminders.${due.key}`, { days: due.days })} - - {categoryLabel} + + {categoryLabel}
@@ -913,29 +916,29 @@ function VorsorgeCard({ // (MOD-06: never "Einnahme" / intake — a measurement is not an intake). The // "next" value carries the discreet neutral due badge; the "last" value is // the last satisfied date. + // v1.18.6.1 — the due/overdue status renders as plain TEXT (not a chip), + // and the "zuletzt erledigt" line ALWAYS renders, falling back to "—" when + // there is no last-done value — mirroring the medication card's next/last + // text rows. const lastValue = reminder.lastSatisfiedAt ? fmt.date(new Date(reminder.lastSatisfiedAt)) - : null; + : "—"; const nextLastSlot = (
{t("measurementReminders.nextDueLabel")} - - - {t(`measurementReminders.${due.key}`, { days: due.days })} - + + {t(`measurementReminders.${due.key}`, { days: due.days })}
- {lastValue && ( -
- - {t("measurementReminders.lastDoneLabel")} - - {lastValue} -
- )} +
+ + {t("measurementReminders.lastDoneLabel")} + + {lastValue} +
); @@ -949,6 +952,7 @@ function VorsorgeCard({ name={resolveReminderLabel(reminder, t)} dose="" categoryLabel={categoryLabel} + nameChip={cadenceChip} stateBadges={stateBadges} actions={headerActions} /> diff --git a/src/components/medications/MedicationCardHeader.tsx b/src/components/medications/MedicationCardHeader.tsx index fe8f3dbb6..a00f84b37 100644 --- a/src/components/medications/MedicationCardHeader.tsx +++ b/src/components/medications/MedicationCardHeader.tsx @@ -36,6 +36,13 @@ export interface MedicationCardHeaderProps { name: string; dose: string; categoryLabel: string; + /** + * v1.18.6.1 — an inline chip rendered DIRECTLY to the right of the name on + * line 1 (e.g. the Vorsorge cadence chip "alle 7 Tage"), mirroring how the + * medication card surfaces its cadence next to the drug name. Kept distinct + * from `stateBadges` (which ride their own row below the category). + */ + nameChip?: ReactNode; stateBadges?: ReactNode; actions?: ReactNode; /** @@ -52,6 +59,7 @@ export function MedicationCardHeader({ name, dose, categoryLabel, + nameChip, stateBadges, actions, href, @@ -59,8 +67,11 @@ export function MedicationCardHeader({ }: MedicationCardHeaderProps) { const body = ( <> - - {name} {dose} + + + {name} {dose} + + {nameChip} {/* D-H6 — state badges (without-notification, paused-since, inactive) used to share line 2 with the category badge