From 3246a6c3d7858c531d12e4ffcc2de6679986c90a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?=
Date: Sun, 17 May 2026 17:15:28 +0200
Subject: [PATCH] ui(medication-intake): promote empty-state CTA into footer
slot
When the user has no active medications, render the Medikament-anlegen
link in the sheet footer beside Cancel rather than as an in-body
button. This balances the empty branch with the populated form (whose
Save button also lives in the footer) and keeps the footer-slot
primary-action promise across both states.
Co-Authored-By: Claude Opus 4.7 (1M context)
---
.../dashboard/medication-intake-quick-add.tsx | 32 +++++++++++--------
1 file changed, 18 insertions(+), 14 deletions(-)
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 = (