-
- {formatDate(row.takenAt)}
-
-
- {flagged && (
-
- )}
-
- {t(
- `mentalHealth.band.${row.instrument}.${row.severityBand}`,
- )}
-
-
- {row.totalScore}
+ {forTab.length === 0 ? (
+
+ {t("mentalHealth.history.empty")}
+
+ ) : (
+
+ {forTab.map((row) => {
+ const flagged = row.item9Flagged;
+ const open = openCrisisRowId === row.id;
+ return (
+ -
+
+
+ {formatDate(row.takenAt)}
+
+ {flagged && (
+
+ )}
+
+ {t(
+ `mentalHealth.band.${row.instrument}.${row.severityBand}`,
+ )}
+
+
+ {row.totalScore}
+
+
-
- {flagged && open && (
-
- )}
-
- );
- })}
-
- )}
- >
- )}
- >
- );
-
- // Pinned: render bare (the host sheet owns the chrome + title). Combined:
- // the landing's titled history card, unchanged.
- if (pinned) {
- return (
-
- {body}
-
- );
- }
-
- return (
-
-
-
- {t("mentalHealth.history.title")}
-
-
- {body}
+ {flagged && open && (
+
+ )}
+
+ );
+ })}
+
+ )}
+ >
+ )}
+
);
}
diff --git a/src/components/mental-health/instrument-card.tsx b/src/components/mental-health/instrument-card.tsx
index 57c9875b6..bb8751403 100644
--- a/src/components/mental-health/instrument-card.tsx
+++ b/src/components/mental-health/instrument-card.tsx
@@ -24,18 +24,11 @@ export function InstrumentCard({
instrument,
last,
onStart,
- onOpenDetail,
}: {
instrument: InstrumentId;
/** Most-recent assessment for this instrument, or undefined when none yet. */
last: AssessmentRow | undefined;
onStart: () => void;
- /**
- * Open this instrument's trend detail. The card BODY (title + last-result
- * line) is the navigation target — mirroring how a medication card opens its
- * detail — while the bottom-pinned Start button stays a separate action.
- */
- onOpenDetail: () => void;
}) {
const { t } = useTranslations();
const { date: formatDate } = useFormatters();
@@ -45,16 +38,10 @@ export function InstrumentCard({
return (
- {/* Body is the detail target: clicking the title / last-result block
- opens this instrument's Verlauf, like a medication card. The Start
- button below is a separate, deliberately non-overlapping action. */}
-