Add custom intervention modals
This commit is contained in:
@@ -8,6 +8,7 @@ import type {
|
||||
CommunicationMethodDetailEntry,
|
||||
ConflictManagementDetailEntry,
|
||||
CoreValueDetailEntry,
|
||||
CreateFlowState,
|
||||
DecisionApproachDetailEntry,
|
||||
MembershipMethodDetailEntry,
|
||||
} from "../../app/(app)/create/types";
|
||||
@@ -232,3 +233,14 @@ export function methodLabelFor(
|
||||
const method = findMethod(source, id);
|
||||
return method?.label ?? "";
|
||||
}
|
||||
|
||||
/** Label for publish / review: preset JSON row, else user-authored wizard meta. */
|
||||
export function publishedMethodDisplayLabel(
|
||||
groupKey: TemplateFacetGroupKey,
|
||||
id: string,
|
||||
customMeta?: CreateFlowState["customMethodCardMetaById"],
|
||||
): string {
|
||||
const preset = methodLabelFor(groupKey, id);
|
||||
if (preset.length > 0) return preset;
|
||||
return customMeta?.[id]?.label?.trim() ?? "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user