- {fields.map((f) => (
-
- ))}
+ {(() => {
+ // Compute the slot for the inline Membership chart: render it
+ // immediately after whichever of (Members current, Member Goal)
+ // appears last among this section's fields-with-history. If
+ // neither field is in this section, the index is -1 and the
+ // chart is skipped — naturally scoping the chart to whichever
+ // section those questions live in (Stage 0 today).
+ const memberIdx = fields.findIndex((f) => f.name === MEMBERS_ACTUAL_NAME);
+ const goalIdx = fields.findIndex((f) => f.name === MEMBERS_GOAL_NAME);
+ const chartIdx = Math.max(memberIdx, goalIdx);
+ const membersFieldInSection = memberIdx >= 0 ? fields[memberIdx] : undefined;
+ const goalFieldInSection = goalIdx >= 0 ? fields[goalIdx] : undefined;
+ return fields.map((f, i) => (
+
+
+ {i === chartIdx && chartIdx >= 0 && (
+
+
+
+ )}
+
+ ));
+ })()}
@@ -1092,154 +1117,26 @@ function FieldHistoryRow({
{expanded && priorEntries.length > 0 && (
-