diff --git a/src/components/medications/detail/medication-detail-tabs.tsx b/src/components/medications/detail/medication-detail-tabs.tsx
index ba0e5da5d..9cefc459a 100644
--- a/src/components/medications/detail/medication-detail-tabs.tsx
+++ b/src/components/medications/detail/medication-detail-tabs.tsx
@@ -923,12 +923,7 @@ export function MedicationDetailTabs({
defaultOpen={false}
>
-
+
{/* v1.40 (#1024) — the courses: when it was taken, and a new
course once the last one has ended. */}
diff --git a/src/components/medications/sections/__tests__/destructive-zone-section.test.tsx b/src/components/medications/sections/__tests__/destructive-zone-section.test.tsx
index 3e71ba1da..5992803ea 100644
--- a/src/components/medications/sections/__tests__/destructive-zone-section.test.tsx
+++ b/src/components/medications/sections/__tests__/destructive-zone-section.test.tsx
@@ -66,10 +66,12 @@ describe("End is offered only for a running course", () => {
,
diff --git a/src/components/medications/sections/destructive-zone-section.tsx b/src/components/medications/sections/destructive-zone-section.tsx
index 541d4ad8e..ae1c193c2 100644
--- a/src/components/medications/sections/destructive-zone-section.tsx
+++ b/src/components/medications/sections/destructive-zone-section.tsx
@@ -83,23 +83,23 @@ const PAUSE_HELPER_ID = "medication-detail-pause-helper";
* Bare (no section / card chrome); the caller supplies its own grouping.
*/
export function LifecycleManageBody({
- medicationId,
- medicationName,
- active,
- courseStatus,
+ medication,
onAfterAction,
}: {
- medicationId: string;
- medicationName: string;
- active: boolean;
- /** Where today sits in the course (server-resolved). */
- courseStatus?: CourseStatus;
+ medication: {
+ id: string;
+ name: string;
+ active: boolean;
+ /** Where today sits in the course (server-resolved). */
+ courseStatus?: CourseStatus;
+ };
onAfterAction?: () => void;
}) {
const { t } = useTranslations();
const queryClient = useQueryClient();
+ const medicationId = medication.id;
- const [paused, setPaused] = useState(!active);
+ const [paused, setPaused] = useState(!medication.active);
const [tier1Busy, setTier1Busy] = useState(false);
async function tier1Toggle(pauseNext: boolean) {
@@ -158,10 +158,10 @@ export function LifecycleManageBody({
/>
- {canEndCourse(courseStatus) && (
+ {canEndCourse(medication.courseStatus) && (
)}