From 0f43daaa2bfd4ad8a0b21de078718c436ad20c6f Mon Sep 17 00:00:00 2001 From: bhansell1 Date: Tue, 21 Apr 2026 10:37:32 +0100 Subject: [PATCH 01/11] CCM-16455: add warning to highlight a user cannot not edit mp --- .../__snapshots__/page.test.tsx.snap | 93 ++++++++---- .../__snapshots__/MessagePlan.test.tsx.snap | 135 ++++++++++++++---- .../forms/MessagePlanForm/MessagePlanForm.tsx | 51 ++++--- frontend/src/content/content.ts | 5 + 4 files changed, 210 insertions(+), 74 deletions(-) diff --git a/frontend/src/__tests__/app/message-plans/create-message-plan/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/create-message-plan/__snapshots__/page.test.tsx.snap index 53032162a..97e010834 100644 --- a/frontend/src/__tests__/app/message-plans/create-message-plan/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/create-message-plan/__snapshots__/page.test.tsx.snap @@ -152,22 +152,41 @@ exports[`CreateMessagePlanPage on submit it invokes the server action and render
+
- -
+
+

- Choose which campaign this message plan will link to -

+ + + Important: + + Important + + +

+ You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan. +

+
+
+
- -
+
+

- Choose which campaign this message plan will link to -

+ + + Important: + + Important + + +

+ You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan. +

+
+
+
- -
+
+

- Choose which campaign this message plan will link to -

+ + + Important: + + Important + + +

+ You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan. +

+
+
+ + {formContent.fields.campaignId.warningCallout.heading} + +

{formContent.fields.campaignId.warningCallout.content}

+ +); + export function MessagePlanForm({ backLink, campaignIds, @@ -80,6 +90,7 @@ export function MessagePlanForm({ {formContent.fields.campaignId.label} {formContent.fields.campaignId.hintSingle} + {campaignWarningCallout} {campaignIds[0]}

) : ( - + <> + + {formContent.fields.campaignId.hintMulti} + {campaignWarningCallout} + + )}
)} diff --git a/frontend/src/content/content.ts b/frontend/src/content/content.ts index 321f22b6f..8bb2a1d5a 100644 --- a/frontend/src/content/content.ts +++ b/frontend/src/content/content.ts @@ -1965,6 +1965,11 @@ const messagePlanForm = { label: 'Campaign', hintSingle: 'This message plan will link to your only campaign:', hintMulti: 'Choose which campaign this message plan will link to', + warningCallout: { + heading: 'Important', + content: + 'You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan.', + }, }, }, submitButton: 'Save and continue', From 7d994999483d36018881effb4a64715fc2a0b990 Mon Sep 17 00:00:00 2001 From: bhansell1 Date: Tue, 21 Apr 2026 12:03:58 +0100 Subject: [PATCH 02/11] CCM-16455: do not show banner when single campaign --- .../__snapshots__/MessagePlan.test.tsx.snap | 42 ------------------- .../forms/MessagePlanForm/MessagePlanForm.tsx | 17 +++----- 2 files changed, 6 insertions(+), 53 deletions(-) diff --git a/frontend/src/__tests__/components/forms/MessagePlan/__snapshots__/MessagePlan.test.tsx.snap b/frontend/src/__tests__/components/forms/MessagePlan/__snapshots__/MessagePlan.test.tsx.snap index 6d4060faa..b64e4c74d 100644 --- a/frontend/src/__tests__/components/forms/MessagePlan/__snapshots__/MessagePlan.test.tsx.snap +++ b/frontend/src/__tests__/components/forms/MessagePlan/__snapshots__/MessagePlan.test.tsx.snap @@ -293,27 +293,6 @@ exports[`renders form with children 1`] = ` > This message plan will link to your only campaign:
-
-

- - - Important: - - Important - -

-

- You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan. -

-
This message plan will link to your only campaign:
-
-

- - - Important: - - Important - -

-

- You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan. -

-
- - {formContent.fields.campaignId.warningCallout.heading} - -

{formContent.fields.campaignId.warningCallout.content}

- -); - export function MessagePlanForm({ backLink, campaignIds, @@ -90,7 +81,6 @@ export function MessagePlanForm({ {formContent.fields.campaignId.label} {formContent.fields.campaignId.hintSingle} - {campaignWarningCallout} {formContent.fields.campaignId.hintMulti} - {campaignWarningCallout} + + + {formContent.fields.campaignId.warningCallout.heading} + +

{formContent.fields.campaignId.warningCallout.content}

+
-
+

- - - Important: - - Important - - -

You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan.

-

+ Important +

+

- - - Important: - - Important - - -

You cannot edit the campaign after you create a message plan. If you need to link to a different campaign later, create a new message plan.