fix(vorsorge): match the medication-card grammar on the reminder card

Mirror the medication card's name + cadence + status layout:
- the cadence ("alle 7 Tage") renders as a chip directly to the right of the
  metric name via a new MedicationCardHeader nameChip slot, instead of on the
  state-badge row below the category;
- the due / overdue status renders as plain text, not a chip;
- the "zuletzt erledigt" line always renders, falling back to an em dash when
  there is no last-done value, instead of being hidden.

The green action button is unchanged. Also drop the per-module tour trigger
from this surface (the tour is first-time-only now).
This commit is contained in:
Marc-André Bombeck committed 2026-06-18 23:58:35 +02:00
1 parent 3ba542f797
commit 8234427a94
2 files changed
+44 -29

No files matched your search

@@ -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 = (
<>
<CardTitle className="text-lg">
{name} {dose}
<CardTitle className="flex flex-wrap items-center gap-x-2 gap-y-1 text-lg">
<span>
{name} {dose}
</span>
{nameChip}
</CardTitle>
{/* D-H6 — state badges (without-notification, paused-since,
inactive) used to share line 2 with the category badge