diff --git a/src/components/dashboard/medication-intake-quick-add.tsx b/src/components/dashboard/medication-intake-quick-add.tsx index de49811f0..db3fd4c2c 100644 --- a/src/components/dashboard/medication-intake-quick-add.tsx +++ b/src/components/dashboard/medication-intake-quick-add.tsx @@ -297,9 +297,18 @@ export function MedicationIntakeQuickAdd({ ); // Empty-state branch: the user has no active medications. Render a - // hint + CTA into the body so the user has a single tap into the - // medication-creation surface. The form itself is suppressed so we - // don't ship an unusable Save button. + // hint into the body and promote the "Medikament anlegen" CTA into + // the sheet footer slot so the primary action lives where the user + // expects it (matches the populated form's Save-button slot). The + // form itself is suppressed so we don't ship an unusable Save + // button. + // + // v1.4.38 W-D P2-1 — symmetry fix. The previous shape rendered the + // CTA in the body and a footer with only the Close button, which + // read as the dialog losing a save button. Now the body carries the + // hint and the footer carries ` Medikament + // anlegen` so the footer-slot promise holds across both + // branches. if (!medicationsLoading && medications.length === 0) { const emptyFooter = (
@@ -310,9 +319,14 @@ export function MedicationIntakeQuickAdd({ onClick={onCancel} className="min-h-11 sm:min-h-9" > - {t("common.close")} + {t("common.cancel")} )} +
); return ( @@ -332,16 +346,6 @@ export function MedicationIntakeQuickAdd({ {t("dashboard.medicationIntakeQuickAdd.emptyDescription")}

- {footerSlot ? createPortal(emptyFooter, footerSlot) : emptyFooter}