From 7bbcf52c254774072596fe5e441a78110ad8761b Mon Sep 17 00:00:00 2001 From: "alex.nuttall1" Date: Tue, 10 Feb 2026 12:50:03 +0000 Subject: [PATCH 1/4] init --- .../__snapshots__/page.test.tsx.snap | 282 +- .../__snapshots__/page.test.tsx.snap | 3202 +++++++------- .../__tests__/app/copy-template/page.test.tsx | 7 +- .../__snapshots__/page.test.tsx.snap | 140 +- .../__snapshots__/page.test.tsx.snap | 20 +- .../__snapshots__/page.test.tsx.snap | 18 +- .../__snapshots__/page.test.tsx.snap | 18 +- .../__snapshots__/page.test.tsx.snap | 82 +- .../[templateId]/page.test.tsx | 11 +- .../app/delete-template/page.test.tsx | 7 +- .../app/edit-email-template/page.test.tsx | 7 +- .../app/edit-nhs-app-template/page.test.tsx | 7 +- .../__snapshots__/page.test.tsx.snap | 500 +-- .../edit-text-message-template/page.test.tsx | 7 +- .../email-template-submitted/page.test.tsx | 11 +- .../__snapshots__/page.test.tsx.snap | 74 +- .../letter-template-submitted/page.test.tsx | 11 +- .../__snapshots__/page.test.tsx.snap | 62 +- .../__snapshots__/page.test.tsx.snap | 452 +- .../__snapshots__/page.test.tsx.snap | 234 +- .../__snapshots__/page.test.tsx.snap | 418 +- .../__snapshots__/page.test.tsx.snap | 204 +- .../__snapshots__/page.test.tsx.snap | 408 +- .../__snapshots__/page.test.tsx.snap | 452 +- .../__snapshots__/page.test.tsx.snap | 194 +- .../__snapshots__/page.test.tsx.snap | 600 +-- .../__snapshots__/page.test.tsx.snap | 204 +- .../__snapshots__/page.test.tsx.snap | 452 +- .../__snapshots__/page.test.tsx.snap | 204 +- .../__snapshots__/page.test.tsx.snap | 452 +- .../__snapshots__/page.test.tsx.snap | 194 +- .../__snapshots__/page.test.tsx.snap | 696 +-- .../__snapshots__/page.test.tsx.snap | 1336 +++--- .../__snapshots__/page.test.tsx.snap | 230 +- .../invalid/__snapshots__/page.test.tsx.snap | 74 +- .../__tests__/app/message-plans/page.test.tsx | 11 +- .../__snapshots__/page.test.tsx.snap | 1326 +++--- .../nhs-app-template-submitted/page.test.tsx | 11 +- .../app/preview-email-template/page.test.tsx | 7 +- .../app/preview-letter-template/page.test.tsx | 11 +- .../preview-nhs-app-template/page.test.tsx | 5 +- .../page.test.tsx | 11 +- .../page.test.tsx | 21 +- .../page.test.tsx | 11 +- .../page.test.tsx | 11 +- .../page.test.tsx | 7 +- .../request-proof-of-template/page.test.tsx | 15 +- .../app/submit-email-template/page.test.tsx | 15 +- .../app/submit-letter-template/page.test.tsx | 13 +- .../app/submit-nhs-app-template/page.test.tsx | 15 +- .../page.test.tsx | 15 +- .../page.test.tsx | 11 +- .../__snapshots__/page.test.tsx.snap | 1790 ++++---- .../__snapshots__/page.test.tsx.snap | 1790 ++++---- .../__snapshots__/page.test.tsx.snap | 70 +- .../__snapshots__/page.test.tsx.snap | 62 +- .../__snapshots__/page.test.tsx.snap | 3902 +++++++++-------- .../__snapshots__/page.test.tsx.snap | 1790 ++++---- .../src/app/choose-a-template-type/page.tsx | 7 +- .../app/copy-template/[templateId]/page.tsx | 7 +- .../app/create-and-submit-templates/page.tsx | 61 +- .../src/app/create-email-template/page.tsx | 7 +- .../src/app/create-nhs-app-template/page.tsx | 7 +- .../app/create-text-message-template/page.tsx | 7 +- .../[templateId]/page.tsx | 11 +- .../app/delete-template/[templateId]/page.tsx | 7 +- .../edit-email-template/[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 7 +- .../edit-template-name/[templateId]/page.tsx | 105 +- .../[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 7 +- frontend/src/app/invalid-template/page.tsx | 7 +- frontend/src/app/layout.tsx | 4 +- .../[templateId]/page.tsx | 7 +- .../campaign-id-required/page.tsx | 7 +- .../[routingConfigId]/page.tsx | 19 +- .../preview-template/[templateId]/page.tsx | 15 +- .../[routingConfigId]/page.tsx | 21 +- .../preview-template/[templateId]/page.tsx | 15 +- .../choose-message-order/page.tsx | 7 +- .../[routingConfigId]/page.tsx | 19 +- .../preview-template/[templateId]/page.tsx | 15 +- .../[routingConfigId]/page.tsx | 17 +- .../preview-template/[templateId]/page.tsx | 15 +- .../[routingConfigId]/page.tsx | 19 +- .../preview-template/[templateId]/page.tsx | 15 +- .../[routingConfigId]/page.tsx | 358 +- .../[routingConfigId]/page.tsx | 19 +- .../preview-template/[templateId]/page.tsx | 15 +- .../create-message-plan/page.tsx | 43 +- .../[routingConfigId]/page.tsx | 59 +- .../[routingConfigId]/page.tsx | 79 +- .../src/app/message-plans/invalid/page.tsx | 7 +- frontend/src/app/message-plans/page.tsx | 23 +- .../[routingConfigId]/page.tsx | 5 +- frontend/src/app/message-templates/page.tsx | 50 +- .../[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 11 +- .../[templateId]/page.tsx | 11 +- .../[templateId]/page.tsx | 11 +- .../[templateId]/page.tsx | 11 +- .../[templateId]/page.tsx | 7 +- .../[templateId]/page.tsx | 15 +- .../[templateId]/page.tsx | 15 +- .../[templateId]/page.tsx | 13 +- .../[templateId]/page.tsx | 15 +- .../[templateId]/page.tsx | 15 +- .../[templateId]/page.tsx | 7 +- .../page.tsx | 5 +- .../page.tsx | 5 +- .../page.tsx | 7 +- .../src/app/upload-letter-template/page.tsx | 8 +- .../page.tsx | 5 +- .../page.tsx | 5 +- .../layouts/container/container.tsx | 8 +- 118 files changed, 12011 insertions(+), 11488 deletions(-) diff --git a/frontend/src/__tests__/app/choose-a-template-type/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/choose-a-template-type/__snapshots__/page.test.tsx.snap index 11086d6c4..a03a6e9f5 100644 --- a/frontend/src/__tests__/app/choose-a-template-type/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/choose-a-template-type/__snapshots__/page.test.tsx.snap @@ -2,162 +2,166 @@ exports[`ChooseATemplateTypePage 1`] = ` - - Back to all templates - -
- + + + + +
+
`; diff --git a/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap index 3aa24995d..ad56ff3d7 100644 --- a/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap @@ -2,1848 +2,1856 @@ exports[`ChooseTemplatesPage renders correctly for a message plan with multiple templates (snapshot) 1`] = ` -
-
- - Message plan - -

- Autumn Campaign Plan -

-

- - Edit settings - -

-
-
+

-
- Routing Plan ID -
-
- fbb81055-79b9-4759-ac07-d191ae57be34 -
-

-
+

-

- Campaign -
-
- campaign-2 -
-
-
+

+
-
- Status -
-
- - Draft - -
-
-
-
    -
  • + Routing Plan ID + +
    + fbb81055-79b9-4759-ac07-d191ae57be34 +
    +
-

- First message -

-
+ Status + +
-

- NHS App -

+ Draft + +
+
+ + +
- - -
  • -
  • - - -
    - + +
    - + + Fallback conditions + +
    +
    - Fallback conditions - - +
      +
    • + + If first message read within 24 hours, no further messages sent. +
    • +
    • + + If first message not read within 24 hours, second message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Second message -

    -
    +

    + Second message +

    -

    - Text message (SMS) -

    -

    - sms template name -

    -
    -
    + + +
  • +
  • +
    + + + + +
    +
  • + + - - -
  • -
  • - - -
    - - - Fallback conditions - - -
    -
      -
    • - - If second message delivered within 72 hours, no further messages sent. -
    • -
    • - - If second message not delivered within 72 hours, third message sent. -
    • -
    +
    -
    -
  • -
  • - -

    - Third message -

    -
    -
    -

    - Email -

    - -
    -
    -
  • -
  • -
  • +
  • + + If second message not delivered within 72 hours, third message sent. +
  • + + + + +
  • - - - Fallback conditions - - - -
  • -
  • - -

    - Fourth message -

    -
    +

    + Third message +

  • + + - -
      +
    • -
    • -
    • + + If third message delivered within 72 hours, no further messages sent. +
    • +
    • + + If third message not delivered within 72 hours, fourth message sent. +
    • +
    + + + +
  • + +

    + Fourth message +

    +
    +

    + Standard English letter +

    -

    - Large print letter (optional) -

    -
    + -
    + + +
  • + - -
  • +
      -
      +
      + + + Conditions for accessible and language letters + + +
      +
        +
      • + + The relevant accessible or language letter will be sent instead of the standard English letter if, both: +
          +
        • + the recipient has requested an accessible or language letter in PDS +
        • +
        • + you've included the relevant template in this message plan +
        • +
        +
      • +
      +
      +
      + +
    • +
      +
      +

      + Large print letter (optional) +

      + +
      +
      +
    • +
    • +
      +
      +

      + Other language letters (optional) +

      +
      +

      + French Letter Template +

      +

      + Spanish Letter Template +

      +
      + + +
    • +
    • +
      + + + + + +
      +
    • +
    + - -
  • - - - -
    - - -
    + + + + - - + - + + + + Save and close + +
    + + - -
    + +
    `; exports[`ChooseTemplatesPage validation should match snapshot when displaying validation errors 1`] = ` -
    - - - -
  • -
  • - - -
    - + +
    - - Fallback conditions - -
    + + Fallback conditions + + +
    +
      +
    • + + If first message read within 24 hours, no further messages sent. +
    • +
    • + + If first message not read within 24 hours, second message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Second message -

    -
    +

    + Second message +

    -

    - Text message (SMS) -

    - +
    - -
  • -
  • -
  • - - -
    - + +
    - - Fallback conditions - -
    + + Fallback conditions + + +
    +
      +
    • + + If second message delivered within 72 hours, no further messages sent. +
    • +
    • + + If second message not delivered within 72 hours, third message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Third message -

    -
    +

    + Third message +

    -

    - Email -

    - +
    - -
  • -
  • -
  • - - -
    - + +
    - - Fallback conditions - -
    + + Fallback conditions + + +
    +
      +
    • + + If third message delivered within 72 hours, no further messages sent. +
    • +
    • + + If third message not delivered within 72 hours, fourth message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Fourth message -

    -
    +

    + Fourth message +

    -

    - Standard English letter -

    - +
    - -
      -
    • - -
      - + +
      - - Conditions for accessible and language letters - -
      -
      -
        + Conditions for accessible and language letters + + +
        -
      • - - The relevant accessible or language letter will be sent instead of the standard English letter if, both: -
          -
        • - the recipient has requested an accessible or language letter in PDS -
        • -
        • - you've included the relevant template in this message plan -
        • -
        -
      • -
      -
      -
      -
    • -
    • -
      +
    • + + The relevant accessible or language letter will be sent instead of the standard English letter if, both: +
        +
      • + the recipient has requested an accessible or language letter in PDS +
      • +
      • + you've included the relevant template in this message plan +
      • +
      +
    • +
    + + +
  • +
  • -

    - Large print letter (optional) -

    - +
    - -
  • -
  • -
    +
  • -

    - Other language letters (optional) -

    -

    - French Letter Template -

    -

    +

    - Spanish Letter Template -

    -
    -
    + + +
  • +
  • +
    + + + + + +
    +
  • + + - - - - - -
    - - -
    + + + + - - + - + + + + Save and close + +
    + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/copy-template/page.test.tsx b/frontend/src/__tests__/app/copy-template/page.test.tsx index 1a4b4c8f0..c8e89d6b7 100644 --- a/frontend/src/__tests__/app/copy-template/page.test.tsx +++ b/frontend/src/__tests__/app/copy-template/page.test.tsx @@ -3,6 +3,7 @@ */ import CopyTemplatePage from '@app/copy-template/[templateId]/page'; import { CopyTemplate } from '@forms/CopyTemplate/CopyTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -64,7 +65,11 @@ describe('CopyTemplatePage', () => { }), }); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); it('should redirect to invalid-template when no templateId is found', async () => { diff --git a/frontend/src/__tests__/app/create-and-submit-templates/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/create-and-submit-templates/__snapshots__/page.test.tsx.snap index 55c4c9e81..a3ee7f2b5 100644 --- a/frontend/src/__tests__/app/create-and-submit-templates/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/create-and-submit-templates/__snapshots__/page.test.tsx.snap @@ -2,79 +2,83 @@ exports[`matches the snapshot 1`] = `
    -
    -
    -

    - Create and submit a template to NHS Notify -

    -

    - Use this tool to create and submit templates you want to send as messages using NHS Notify. -

    -

    - You can create templates for: -

    -
      -
    • - NHS App messages -
    • -
    • - emails -
    • -
    • - text messages (SMS) -
    • -
    • - letters -
    • -
    -

    - When you submit a template, it will be used by NHS Notify to set up the messages you want to send. -

    -

    - Before you start -

    -

    - Only use this tool if your message content has been approved by the relevant stakeholders in your team. -

    -

    - You can save a template as a draft and edit it later. -

    -

    - If you want to change a submitted template, you must create a new template to replace it. -

    -

    - You can access this tool by signing in with your Care Identity. -

    - - Start now - +

    + Create and submit a template to NHS Notify +

    +

    + Use this tool to create and submit templates you want to send as messages using NHS Notify. +

    +

    + You can create templates for: +

    +
      +
    • + NHS App messages +
    • +
    • + emails +
    • +
    • + text messages (SMS) +
    • +
    • + letters +
    • +
    +

    + When you submit a template, it will be used by NHS Notify to set up the messages you want to send. +

    +

    + Before you start +

    +

    + Only use this tool if your message content has been approved by the relevant stakeholders in your team. +

    +

    + You can save a template as a draft and edit it later. +

    +

    + If you want to change a submitted template, you must create a new template to replace it. +

    +

    + You can access this tool by signing in with your Care Identity. +

    + + Start now + +
    -
    - + + `; diff --git a/frontend/src/__tests__/app/create-email-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/create-email-template/__snapshots__/page.test.tsx.snap index 17dcf630c..13f9d6848 100644 --- a/frontend/src/__tests__/app/create-email-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/create-email-template/__snapshots__/page.test.tsx.snap @@ -1,14 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreateEmailTemplatePage should render CreateEmailTemplatePage 1`] = ` - + + /> + `; diff --git a/frontend/src/__tests__/app/create-nhs-app-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/create-nhs-app-template/__snapshots__/page.test.tsx.snap index 6654f0594..80cf3aa6c 100644 --- a/frontend/src/__tests__/app/create-nhs-app-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/create-nhs-app-template/__snapshots__/page.test.tsx.snap @@ -1,13 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreateNHSAppTemplatePage should render CreateNHSAppTemplatePage 1`] = ` - + + /> + `; diff --git a/frontend/src/__tests__/app/create-text-message-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/create-text-message-template/__snapshots__/page.test.tsx.snap index 8493572b8..a9f3831bc 100644 --- a/frontend/src/__tests__/app/create-text-message-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/create-text-message-template/__snapshots__/page.test.tsx.snap @@ -1,13 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreateSMSTemplatePage should render CreateSMSTemplatePage 1`] = ` - + + /> + `; diff --git a/frontend/src/__tests__/app/delete-template-error/[templateId]/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/delete-template-error/[templateId]/__snapshots__/page.test.tsx.snap index eaa990c4b..9b308d7af 100644 --- a/frontend/src/__tests__/app/delete-template-error/[templateId]/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/delete-template-error/[templateId]/__snapshots__/page.test.tsx.snap @@ -2,51 +2,55 @@ exports[`DeleteTemplateError page matches snapshot 1`] = ` -
    -
    -

    - You cannot delete the template 'Test Template' -

    -

    - The template is linked to these message plans: -

    -
      -
    • - Email Campaign -
    • -
    • - SMS Notification -
    • -
    -

    - You need to unlink it from each message plan before you can delete it. -

    -

    - + You cannot delete the template 'Test Template' + +

    + The template is linked to these message plans: +

    + +

    + You need to unlink it from each message plan before you can delete it. +

    +

    + + Go back + +

    +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/delete-template-error/[templateId]/page.test.tsx b/frontend/src/__tests__/app/delete-template-error/[templateId]/page.test.tsx index 818250f6f..74322b25f 100644 --- a/frontend/src/__tests__/app/delete-template-error/[templateId]/page.test.tsx +++ b/frontend/src/__tests__/app/delete-template-error/[templateId]/page.test.tsx @@ -2,6 +2,7 @@ import { render } from '@testing-library/react'; import DeleteTemplateErrorPage, { generateMetadata, } from '@app/delete-template-error/[templateId]/page'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { getTemplate } from '@utils/form-actions'; import { getRoutingConfigReferencesByTemplateId } from '@utils/message-plans'; import type { @@ -110,10 +111,12 @@ describe('DeleteTemplateError page', () => { expect(redirectMock).not.toHaveBeenCalled(); expect(result).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/delete-template/page.test.tsx b/frontend/src/__tests__/app/delete-template/page.test.tsx index 62d04c2b3..07d0f72b4 100644 --- a/frontend/src/__tests__/app/delete-template/page.test.tsx +++ b/frontend/src/__tests__/app/delete-template/page.test.tsx @@ -3,6 +3,7 @@ */ import DeleteTemplatePage from '@app/delete-template/[templateId]/page'; import { DeleteTemplate } from '@forms/DeleteTemplate/DeleteTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -45,7 +46,11 @@ describe('PreviewEmailTemplatePage', () => { }), }); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); it('should redirect to invalid-template when no templateId is found', async () => { diff --git a/frontend/src/__tests__/app/edit-email-template/page.test.tsx b/frontend/src/__tests__/app/edit-email-template/page.test.tsx index 20b8eb651..ec78929a1 100644 --- a/frontend/src/__tests__/app/edit-email-template/page.test.tsx +++ b/frontend/src/__tests__/app/edit-email-template/page.test.tsx @@ -8,6 +8,7 @@ import { getTemplate } from '@utils/form-actions'; import { redirect } from 'next/navigation'; import { EmailTemplateForm } from '@forms/EmailTemplateForm/EmailTemplateForm'; import { EmailTemplate } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import content from '@content/content'; const { editPageTitle } = content.components.templateFormEmail; @@ -84,6 +85,10 @@ describe('EditEmailTemplatePage', () => { expect(await generateMetadata()).toEqual({ title: editPageTitle }); expect(getTemplateMock).toHaveBeenCalledWith('template-id'); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); }); diff --git a/frontend/src/__tests__/app/edit-nhs-app-template/page.test.tsx b/frontend/src/__tests__/app/edit-nhs-app-template/page.test.tsx index 57e15156b..093084547 100644 --- a/frontend/src/__tests__/app/edit-nhs-app-template/page.test.tsx +++ b/frontend/src/__tests__/app/edit-nhs-app-template/page.test.tsx @@ -5,6 +5,7 @@ import { redirect } from 'next/navigation'; import { NHSAppTemplate } from 'nhs-notify-web-template-management-utils'; import { getTemplate } from '@utils/form-actions'; import { NhsAppTemplateForm } from '@forms/NhsAppTemplateForm/NhsAppTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import EditNhsAppTemplatePage, { generateMetadata, } from '@app/edit-nhs-app-template/[templateId]/page'; @@ -55,7 +56,11 @@ describe('EditNhsAppTemplatePage', () => { }); expect(await generateMetadata()).toEqual({ title: editPageTitle }); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); test('should render invalid template, when template is not found', async () => { diff --git a/frontend/src/__tests__/app/edit-template-name/[templateId]/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/edit-template-name/[templateId]/__snapshots__/page.test.tsx.snap index 59d9d00a5..d85394e2e 100644 --- a/frontend/src/__tests__/app/edit-template-name/[templateId]/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/edit-template-name/[templateId]/__snapshots__/page.test.tsx.snap @@ -2,290 +2,298 @@ exports[`valid template matches snapshot on initial render 1`] = ` -
    -
    -
    - - - - -
    -

    - -

    + + + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Edit template name + +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - -
    - + -
    + + + Go back + +
    + +
    - -
    + +
    `; exports[`valid template renders errors when blank form is submitted and error state is returned 1`] = ` -
    - -
    +

    + There is a problem +

    + +
    -
    - - - - -
    -

    - -

    + + + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Edit template name + +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - - +
    + -
    + + + Go back + +
    + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/edit-text-message-template/page.test.tsx b/frontend/src/__tests__/app/edit-text-message-template/page.test.tsx index d10a90d76..6a06ffebe 100644 --- a/frontend/src/__tests__/app/edit-text-message-template/page.test.tsx +++ b/frontend/src/__tests__/app/edit-text-message-template/page.test.tsx @@ -8,6 +8,7 @@ import { getTemplate } from '@utils/form-actions'; import { redirect } from 'next/navigation'; import { SmsTemplateForm } from '@forms/SmsTemplateForm/SmsTemplateForm'; import { TemplateDto } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { SMSTemplate } from 'nhs-notify-web-template-management-utils'; import content from '@content/content'; @@ -83,6 +84,10 @@ describe('EditSmsTemplatePage', () => { expect(await generateMetadata()).toEqual({ title: editPageTitle }); expect(getTemplateMock).toHaveBeenCalledWith('template-id'); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); }); diff --git a/frontend/src/__tests__/app/email-template-submitted/page.test.tsx b/frontend/src/__tests__/app/email-template-submitted/page.test.tsx index 70c1a01dc..746106f91 100644 --- a/frontend/src/__tests__/app/email-template-submitted/page.test.tsx +++ b/frontend/src/__tests__/app/email-template-submitted/page.test.tsx @@ -4,6 +4,7 @@ import EmailTemplateSubmittedPage, { generateMetadata, } from '@app/email-template-submitted/[templateId]/page'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplateSubmitted } from '@molecules/TemplateSubmitted/TemplateSubmitted'; import { getTemplate } from '@utils/form-actions'; import { redirect } from 'next/navigation'; @@ -46,10 +47,12 @@ describe('EmailTemplateSubmittedPage', () => { expect(getTemplateMock).toHaveBeenCalledWith('template-id'); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/invalid-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/invalid-template/__snapshots__/page.test.tsx.snap index 93380e4de..ee42620d5 100644 --- a/frontend/src/__tests__/app/invalid-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/invalid-template/__snapshots__/page.test.tsx.snap @@ -2,45 +2,49 @@ exports[`InvalidTemplatePage 1`] = ` -
    -
    -

    - Sorry, we could not find that page -

    -

    - You may have typed or pasted a web address incorrectly. - - Go to the start page. - -

    -

    - If the web address is correct or you selected a link or button, contact us to let us know there is a problem with this page: -

    -

    - By email -

    -

    - +

    + You may have typed or pasted a web address incorrectly. + + Go to the start page. + +

    +

    + If the web address is correct or you selected a link or button, contact us to let us know there is a problem with this page: +

    +

    - ssd.nationalservicedesk@nhs.net - -

    -

    -
    + By email + +

    + + ssd.nationalservicedesk@nhs.net + +

    + + +
    `; diff --git a/frontend/src/__tests__/app/letter-template-submitted/page.test.tsx b/frontend/src/__tests__/app/letter-template-submitted/page.test.tsx index cdc7e7236..7d11a643e 100644 --- a/frontend/src/__tests__/app/letter-template-submitted/page.test.tsx +++ b/frontend/src/__tests__/app/letter-template-submitted/page.test.tsx @@ -5,6 +5,7 @@ import LetterTemplateSubmittedPage, { generateMetadata, } from '@app/letter-template-submitted/[templateId]/page'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplateSubmitted } from '@molecules/TemplateSubmitted/TemplateSubmitted'; import { PDF_LETTER_TEMPLATE } from '@testhelpers/helpers'; import { getTemplate } from '@utils/form-actions'; @@ -40,10 +41,12 @@ describe('LetterTemplateSubmittedPage', () => { expect(getTemplateMock).toHaveBeenCalledWith('template-id'); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/message-plans/campaign-id-required/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/campaign-id-required/__snapshots__/page.test.tsx.snap index aa428363f..7ef407c6b 100644 --- a/frontend/src/__tests__/app/message-plans/campaign-id-required/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/campaign-id-required/__snapshots__/page.test.tsx.snap @@ -2,44 +2,48 @@ exports[`matches snapshot 1`] = ` -
    -
    -

    - You cannot create message plans yet -

    -

    - To get access, contact your onboarding manager and give them this error message: -

    +

    + You cannot create message plans yet +

    - Account needs a campaign ID + To get access, contact your onboarding manager and give them this error message:

    -
    -

    - - Go back - -

    +

    + Account needs a campaign ID +

    +
    +

    + + Go back + +

    +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-email-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-email-template/__snapshots__/page.test.tsx.snap index 503e0172b..a1c35895e 100644 --- a/frontend/src/__tests__/app/message-plans/choose-email-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-email-template/__snapshots__/page.test.tsx.snap @@ -2,263 +2,267 @@ exports[`ChooseEmailTemplate page renders Email template selection 1`] = ` -
    -
    - - Autumn Campaign Plan - -

    - Choose an email template -

    -
    -
    - - - -
    -
    -
    - Previously selected template -
    -
    - email template name -
    -
    -
    -
    +

    + Choose an email template +

    +
    + -
    + + +
    - Choose one option +
    + Previously selected template +
    +
    + email template name +
    +
    +
    + Choose one option +
    +
    - - - - - - - - - - - - + + + - - 13th Jan 2025 -
    - 10:19 - - + + + + - - -
    - Select - - Name - - Type - - Last edited - -
    - -
    +
    - - - - - - - Name - - email template name - - - - Type - - Email - - + +
    - +
    + + +
    +
    + + email template name + - - - + + 13th Jan 2025 +
    + 10:19 +
    - Preview - -
    + + + Preview + + + + + +
    -
    -
    - - - Go back - -
    - + + + Go back + +
    + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-email-template/preview-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-email-template/preview-template/__snapshots__/page.test.tsx.snap index f148d0121..0500bddc5 100644 --- a/frontend/src/__tests__/app/message-plans/choose-email-template/preview-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-email-template/preview-template/__snapshots__/page.test.tsx.snap @@ -2,143 +2,147 @@ exports[`PreviewEmailTemplateFromMessagePlan page renders Email template preview 1`] = ` - - Go back - -
    -
    + Go back + +
    - - Template - -

    - email template name -

    -
    -
    -
    -
    -
    - Template ID -
    -
    - email-template-id -
    -
    -
    +

    -
    - Template type -
    -
    - Email -
    -

    -
    -
    +
    +
    -
    -
    -
    - Subject -
    -
    -
    +
    + email-template-id +
    +
    +
    -
    + Template type + +
    - subject -
    - -
    -
    +
    + +
    -
    -
    - Message -
    -
    -
    + Subject +
    + +
    +
    + subject +
    +
    +
    +
    -
    +
    + Message +
    + +
    -

    - message -

    - +
    +

    + message +

    + -
    -
    -
    - +
    + +
    + + + + Go back + - - Go back - - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/__snapshots__/page.test.tsx.snap index fc53d5315..ae4da5477 100644 --- a/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/__snapshots__/page.test.tsx.snap @@ -2,243 +2,247 @@ exports[`ChooseLargePrintLetterTemplate page renders large print letter template selection 1`] = ` -
    -
    - - Autumn Campaign Plan - -

    - Choose a large print letter template -

    -
    -
    - - -
    + + Autumn Campaign Plan + +

    + Choose a large print letter template +

    +
    + + + +
    - Choose one option -
    -
    - +
    +
    -
    - - - - - - - - - - + + + - - 13th Jan 2025 -
    - 10:19 - - + + + + - - -
    - Select - - Name - - Type - - Last edited - -
    - -
    +
    - - - - - - - Name - - large print letter template name - - - - Type - - Large print letter - - + +
    - +
    + + +
    +
    + + large print letter template name + + + Large print letter + - - - - Preview - -
    + + + Preview + + + + + +
    -
    -
    - - - Go back - -
    - + + + Go back + + + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/preview-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/preview-template/__snapshots__/page.test.tsx.snap index 09a067b39..bae492c24 100644 --- a/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/preview-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-large-print-letter-template/preview-template/__snapshots__/page.test.tsx.snap @@ -2,121 +2,125 @@ exports[`PreviewLargePrintLetterTemplateFromMessagePlan page renders large print letter template preview 1`] = ` - - Go back - -
    -
    + Go back + +
    - - Template - -

    - large print letter template name -

    -
    -
    -
    -
    -
    - Template ID -
    -
    - large-print-letter-template-id -
    -
    -
    +

    -
    - Template type -
    -
    - Large print letter -
    -

    -
    +
    +
    +
    -
    - Template file -
    -
    + Template ID + +
    + large-print-letter-template-id +
    +
    +
    -
    - -

    +

    + Large print letter +
    +
    +
    +
    + Template file +
    +
    +
    - large-print-template.pdf -

    -
    -
    -
    -
    + +

    + large-print-template.pdf +

    +
    + +
    + +
    + + Go back + - - Go back - - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-message-order/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-message-order/__snapshots__/page.test.tsx.snap index 26f886e7b..2cfb43f3d 100644 --- a/frontend/src/__tests__/app/message-plans/choose-message-order/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-message-order/__snapshots__/page.test.tsx.snap @@ -2,229 +2,233 @@ exports[`ChooseMessageOrderPage 1`] = ` -
    -
    - - -
    -
    + +
    - -

    - Choose a message order -

    -
    -
    -
    - Select one option -
    +

    + Choose a message order +

    +
    - - + Select one option
    - - -
    -
    - -
    +
    - NHS App, Text message - -
    -
    - -
    +
    - NHS App, Email, Text message - -
    -
    - -
    +
    - NHS App, Text message, Email - -
    -
    - -
    +
    - NHS App, Text message, Letter - -
    -
    - -
    +
    - NHS App, Email, Text message, Letter - -
    -
    - -
    +
    - Letter only - + + +
    +
    + + +
    -
    -
    -
    - - - Go back - -
    -
    + + + + + Go back + + + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/__snapshots__/page.test.tsx.snap index 7b946541f..053be1d28 100644 --- a/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/__snapshots__/page.test.tsx.snap @@ -2,263 +2,267 @@ exports[`ChooseNHSAppTemplate page renders NHS App template selection 1`] = ` -
    -
    - - Autumn Campaign Plan - -

    - Choose an NHS App template -

    -
    -
    - - - -
    -
    -
    - Previously selected template -
    -
    - app template name -
    -
    -
    -
    +

    + Choose an NHS App template +

    +
    + -
    + + +
    - Choose one option +
    + Previously selected template +
    +
    + app template name +
    +
    +
    + Choose one option +
    +
    - - - - - - - - - - - - + + + - - 13th Jan 2025 -
    - 10:19 - - + + + + - - -
    - Select - - Name - - Type - - Last edited - -
    - -
    +
    - - - - - - - Name - - app template name - - - - Type - - NHS App message - - + +
    - +
    + + +
    +
    + + app template name + - - - + + 13th Jan 2025 +
    + 10:19 +
    - Preview - -
    + + + Preview + + + + + +
    -
    -
    - - - Go back - -
    - + + + Go back + +
    + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/preview-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/preview-template/__snapshots__/page.test.tsx.snap index 383cb32e6..adc53a293 100644 --- a/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/preview-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-nhs-app-template/preview-template/__snapshots__/page.test.tsx.snap @@ -2,118 +2,122 @@ exports[`PreviewNhsAppTemplateFromMessagePlan page renders NHS App template preview 1`] = ` - - Go back - -
    -
    + Go back + +
    - - Template - -

    - app template name -

    -
    -
    -
    -
    -
    - Template ID -
    -
    - app-template-id -
    -
    -
    +

    -
    - Template type -
    -
    - NHS App message -
    -

    -
    -
    +
    +
    -
    -
    -
    + Template ID +
    +
    - Message -
    - -
    +
    +
    -
    + Template type + +
    -

    - message -

    - + NHS App message +
    +
    + +
    +
    +
    +
    + Message +
    +
    +
    +
    +

    + message +

    + -
    -
    -
    -
    +
    + +
    + +
    + + Go back + - - Go back - - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/__snapshots__/page.test.tsx.snap index 2860ada61..dbd8f97b1 100644 --- a/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/__snapshots__/page.test.tsx.snap @@ -2,347 +2,351 @@ exports[`ChooseOtherLanguageLetterTemplate page renders foreign language letter template selection 1`] = ` -
    -
    - - Autumn Campaign Plan - -

    - Choose other language letter templates -

    -
    -
    - - -
    + + Autumn Campaign Plan + +

    + Choose other language letter templates +

    +
    + + + +
    - Choose all the templates that you want to include in this message plan. You can only choose one template for each language. -
    -
    + Choose all the templates that you want to include in this message plan. You can only choose one template for each language. +
    +
    - - - - - - - - - - - + Select + + + + + + + - + - - - - + + - - - + + - - - - - - + + - - -
    - Select - - Name - - Type - - Last edited - -
    + Name + + Type + + Last edited + +
    - - - + - - - - - - - Standard letter - French - - - Last edited - - 13th Jan 2025 -
    - 10:19 -
    - + Standard letter - French + - - - - Preview - -
    - + - - - - - - - Standard letter - Polish - - - Last edited - - 13th Jan 2025 -
    - 10:19 -
    - + Standard letter - Polish + - - - - Preview - -
    + + + Preview + + + + + +
    -
    -
    - - - Go back - -
    - + + + Go back + + + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/__snapshots__/page.test.tsx.snap index b3e4d7ac5..eb9ef4fe4 100644 --- a/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/__snapshots__/page.test.tsx.snap @@ -2,121 +2,125 @@ exports[`PreviewOtherLanguageLetterTemplateFromMessagePlan page renders foreign language letter template preview 1`] = ` - - Go back - -
    -
    + Go back + +
    - - Template - -

    - French letter template -

    -
    -
    -
    -
    -
    - Template ID -
    -
    - french-letter-id -
    -
    -
    +

    -
    - Template type -
    -
    - Standard letter - French -
    -

    -
    +
    +
    +
    -
    - Template file -
    -
    + Template ID + +
    + french-letter-id +
    +
    +
    -
    - -

    +

    + Standard letter - French +
    +
    +
    +
    + Template file +
    +
    +
    - template.pdf -

    -
    -
    -
    -
    + +

    + template.pdf +

    +
    + +
    + +
    + + Go back + - - Go back - - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/__snapshots__/page.test.tsx.snap index 06f5ecf8c..b8ca80f33 100644 --- a/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/__snapshots__/page.test.tsx.snap @@ -2,263 +2,267 @@ exports[`ChooseStandardEnglishLetterTemplate page renders letter template selection 1`] = ` -
    -
    - - Autumn Campaign Plan - -

    - Choose a letter template -

    -
    -
    - - - -
    -
    -
    - Previously selected template -
    -
    - letter template name -
    -
    -
    -
    +

    + Choose a letter template +

    +
    + -
    + + +
    - Choose one option +
    + Previously selected template +
    +
    + letter template name +
    +
    +
    + Choose one option +
    +
    - - - - - - - - - - - - + + + - - 13th Jan 2025 -
    - 10:19 - - + + + + - - -
    - Select - - Name - - Type - - Last edited - -
    - -
    +
    - - - - - - - Name - - letter template name - - - - Type - - Standard letter - - + +
    - +
    + + +
    +
    + + letter template name + - - - + + 13th Jan 2025 +
    + 10:19 +
    - Preview - -
    + + + Preview + + + + + +
    -
    -
    - - - Go back - -
    - + + + Go back + +
    + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/preview-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/preview-template/__snapshots__/page.test.tsx.snap index 290712f72..eb9af4a2c 100644 --- a/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/preview-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-standard-english-letter-template/preview-template/__snapshots__/page.test.tsx.snap @@ -2,121 +2,125 @@ exports[`PreviewStandardEnglishLetterTemplateFromMessagePlan page renders letter template preview 1`] = ` - - Go back - -
    -
    + Go back + +
    - - Template - -

    - letter template name -

    -
    -
    -
    -
    -
    - Template ID -
    -
    - letter-template-id -
    -
    -
    +

    -
    - Template type -
    -
    - Standard letter -
    -

    -
    +
    +
    +
    -
    - Template file -
    -
    + Template ID + +
    + letter-template-id +
    +
    +
    -
    - -

    +

    + Standard letter +
    +
    +
    +
    + Template file +
    +
    +
    - template.pdf -

    -
    -
    -
    -
    + +

    + template.pdf +

    +
    + +
    + +
    + + Go back + - - Go back - - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-text-message-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-text-message-template/__snapshots__/page.test.tsx.snap index 888ea5477..37822388e 100644 --- a/frontend/src/__tests__/app/message-plans/choose-text-message-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-text-message-template/__snapshots__/page.test.tsx.snap @@ -2,263 +2,267 @@ exports[`ChooseTextMessageTemplate page renders sms template selection 1`] = ` -
    -
    - - Autumn Campaign Plan - -

    - Choose a text message (SMS) template -

    -
    -
    - - - -
    -
    -
    - Previously selected template -
    -
    - sms template name -
    -
    -
    -
    +

    + Choose a text message (SMS) template +

    +
    + -
    + + +
    - Choose one option +
    + Previously selected template +
    +
    + sms template name +
    +
    +
    + Choose one option +
    +
    - - - - - - - - - - - - + + + - - 13th Jan 2025 -
    - 10:19 - - + + + + - - -
    - Select - - Name - - Type - - Last edited - -
    - -
    +
    - - - - - - - Name - - sms template name - - - - Type - - Text message (SMS) - - + +
    - +
    + + +
    +
    + + sms template name + - - - + + 13th Jan 2025 +
    + 10:19 +
    - Preview - -
    + + + Preview + + + + + +
    -
    -
    - - - Go back - -
    - + + + Go back + +
    + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/choose-text-message-template/preview-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/choose-text-message-template/preview-template/__snapshots__/page.test.tsx.snap index 3c280cf82..a484478a6 100644 --- a/frontend/src/__tests__/app/message-plans/choose-text-message-template/preview-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/choose-text-message-template/preview-template/__snapshots__/page.test.tsx.snap @@ -2,118 +2,122 @@ exports[`PreviewTextMessageTemplateFromMessagePlan page renders SMS template preview 1`] = ` - - Go back - -
    -
    + Go back + +
    - - Template - -

    - sms template name -

    -
    -
    -
    -
    -
    - Template ID -
    -
    - sms-template-id -
    -
    -
    +

    -
    - Template type -
    -
    - Text message (SMS) -
    -

    -
    -
    +
    +
    -
    -
    -
    + Template ID +
    +
    - Message -
    - -
    +
    +
    -
    + Template type + +
    -

    - message -

    - + Text message (SMS) +
    +
    + +
    +
    +
    +
    + Message +
    +
    +
    +
    +

    + message +

    + -
    -
    -
    -
    +
    + +
    + +
    + + Go back + - - Go back - - -
    + +
    `; 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 75ba53b63..53032162a 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 @@ -2,407 +2,415 @@ exports[`CreateMessagePlanPage on submit it invokes the server action and renders error summary 1`] = ` -
    - - - -
    + +
    `; exports[`CreateMessagePlanPage renders the page 1`] = ` -
    -
    -

    - Create a message plan -

    -
    - - -
    - -
    - This will not be visible to recipients. -
    -
    - - - Naming your message plans - - -
    -

    - You should name your message plans in a way that works best for your service or organisation. -

    -

    - Common message plan names include the: -

    -
      -
    • - channels it uses -
    • -
    • - subject or reason for the message -
    • -
    • - intended audience for the message -
    • -
    • - version number -
    • -
    -

    - For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' -

    -
    -
    -
    - -
    -
    -
    + + +
    - Choose which campaign this message plan will link to + This will not be visible to recipients.
    - +

    + You should name your message plans in a way that works best for your service or organisation. +

    +

    + Common message plan names include the: +

    +
      +
    • + channels it uses +
    • +
    • + subject or reason for the message +
    • +
    • + intended audience for the message +
    • +
    • + version number +
    • +
    +

    + For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' +

    +
    + +
    + +
    -
    - +
    + - - + + + Go back + + + + + - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/edit-message-plan-settings/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/edit-message-plan-settings/__snapshots__/page.test.tsx.snap index 6005e779e..05be5dc01 100644 --- a/frontend/src/__tests__/app/message-plans/edit-message-plan-settings/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/edit-message-plan-settings/__snapshots__/page.test.tsx.snap @@ -2,786 +2,802 @@ exports[`multiple campaigns matches snapshot 1`] = ` -
    -
    -

    - Edit message plan settings -

    -
    - - -
    - -
    - This will not be visible to recipients. -
    -
    - - - Naming your message plans - - -
    -

    - You should name your message plans in a way that works best for your service or organisation. -

    -

    - Common message plan names include the: -

    -
      -
    • - channels it uses -
    • -
    • - subject or reason for the message -
    • -
    • - intended audience for the message -
    • -
    • - version number -
    • -
    -

    - For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' -

    -
    -
    -
    - -
    -
    -
    + + +
    - Choose which campaign this message plan will link to + This will not be visible to recipients.
    - +

    + You should name your message plans in a way that works best for your service or organisation. +

    +

    + Common message plan names include the: +

    +
      +
    • + channels it uses +
    • +
    • + subject or reason for the message +
    • +
    • + intended audience for the message +
    • +
    • + version number +
    • +
    +

    + For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' +

    +
    + +
    + +
    -
    - +
    + - - - + + + Go back + + + + + + - -
    + +
    `; exports[`multiple campaigns renders errors when form is submitted in invalid state 1`] = ` -
    - -
    +
    +
    +

    + Edit message plan settings +

    + + +
    - Choose which campaign this message plan will link to + This will not be visible to recipients.
    - + + + Naming your message plans + + +
    +

    + You should name your message plans in a way that works best for your service or organisation. +

    +

    + Common message plan names include the: +

    +
      +
    • + channels it uses +
    • +
    • + subject or reason for the message +
    • +
    • + intended audience for the message +
    • +
    • + version number +
    • +
    +

    + For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' +

    +
    + +
    - Error: + + Error: + + Message plan name too long - Select a campaign - - + Choose which campaign this message plan will link to +
    + + + Error: + + Select a campaign + + +
    -
    -
    - - - + + + Go back + +
    + + + + - -
    + +
    `; exports[`single campaign matches snapshot 1`] = ` -
    -
    -

    - Edit message plan settings -

    -
    - - -
    - + Edit message plan settings + + + +
    - This will not be visible to recipients. -
    -
    - - - Naming your message plans - - + Message plan name +
    -

    - You should name your message plans in a way that works best for your service or organisation. -

    -

    - Common message plan names include the: -

    -
      + This will not be visible to recipients. +
    +
    + + + Naming your message plans + + +
    -
  • - channels it uses -
  • -
  • - subject or reason for the message -
  • -
  • - intended audience for the message -
  • -
  • - version number -
  • - -

    - For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' -

    +

    + You should name your message plans in a way that works best for your service or organisation. +

    +

    + Common message plan names include the: +

    +
      +
    • + channels it uses +
    • +
    • + subject or reason for the message +
    • +
    • + intended audience for the message +
    • +
    • + version number +
    • +
    +

    + For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' +

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

    + aff79ee0-4481-4fa3-8a1a-0df53c7b41e5 +

    -
    -
    -
    - This message plan will link to your only campaign: + + + Go back +
    -

    - aff79ee0-4481-4fa3-8a1a-0df53c7b41e5 -

    -
    -
    - - - Go back - -
    - - - + + +
    - -
    + +
    `; exports[`single campaign renders errors when form is submitted in invalid state 1`] = ` -
    - -
    +
    +
    +

    + Edit message plan settings +

    + + +
    - This will not be visible to recipients. -
    -
    - - +
    + This will not be visible to recipients. +
    +
    + - Naming your message plans - - + + Naming your message plans + +
    +
    +

    + You should name your message plans in a way that works best for your service or organisation. +

    +

    + Common message plan names include the: +

    +
      +
    • + channels it uses +
    • +
    • + subject or reason for the message +
    • +
    • + intended audience for the message +
    • +
    • + version number +
    • +
    +

    + For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' +

    +
    +
    -

    - You should name your message plans in a way that works best for your service or organisation. -

    -

    - Common message plan names include the: -

    -
      + -
    • - channels it uses -
    • -
    • - subject or reason for the message -
    • -
    • - intended audience for the message -
    • -
    • - version number -
    • -
    -

    - For example, 'Email, SMS, letter - covid19 2023 - over 65s - version 3' -

    + + Error: + + Enter a message plan name + +
    - +
    - - - Error: - - Enter a message plan name - + Campaign + +
    + This message plan will link to your only campaign: +
    +

    + aff79ee0-4481-4fa3-8a1a-0df53c7b41e5 +

    -
    -
    -
    - This message plan will link to your only campaign: + + + Go back +
    -

    - aff79ee0-4481-4fa3-8a1a-0df53c7b41e5 -

    -
    -
    - - - Go back - -
    - - - + + +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/get-ready-to-move/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/get-ready-to-move/__snapshots__/page.test.tsx.snap index df9f80d71..f972fd35d 100644 --- a/frontend/src/__tests__/app/message-plans/get-ready-to-move/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/get-ready-to-move/__snapshots__/page.test.tsx.snap @@ -2,135 +2,139 @@ exports[`matches snapshot 1`] = ` -
    -
    - - Step 1 of 2 - -

    - Get ready to move message plan to production -

    -
    -
    -
    - Name -
    -
    - My Routing Config -
    -
    -
    -

    - Moving message plans from draft to production means they are ready to send. -

    -

    - Any templates used in these message plans will be locked. -

    -

    - Messages will only be sent to recipients when you make a request with - +

    - NHS Notify API (opens in a new tab) - - or - +
    - NHS Notify MESH (opens in a new tab) - - . -

    -

    - Before you continue -

    -

    - Make sure: -

    -
      -
    • - the relevant stakeholders in your team have approved your templates and message plan -
    • -
    • - your templates have no errors -
    • -
    -
    -

    - Important - - : - -

    +
    + Name +
    +
    + My Routing Config +
    +
    +

    - You cannot edit anything that is in production. + Moving message plans from draft to production means they are ready to send.

    - If you need to edit your templates or message plans, you can copy and replace them. + Any templates used in these message plans will be locked.

    -

    -
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/invalid/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/invalid/__snapshots__/page.test.tsx.snap index e4aaf02c8..b8eb1f00c 100644 --- a/frontend/src/__tests__/app/message-plans/invalid/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/invalid/__snapshots__/page.test.tsx.snap @@ -2,45 +2,49 @@ exports[`InvalidMessagePlanPage 1`] = ` -
    -
    -

    - Sorry, we could not find that page -

    -

    - You may have typed or pasted a web address incorrectly. - - Go to the start page. - -

    -

    - If the web address is correct or you selected a link or button, contact us to let us know there is a problem with this page: -

    -

    - By email -

    -

    - +

    + You may have typed or pasted a web address incorrectly. + + Go to the start page. + +

    +

    + If the web address is correct or you selected a link or button, contact us to let us know there is a problem with this page: +

    +

    - ssd.nationalservicedesk@nhs.net - -

    -

    -
    + By email + +

    + + ssd.nationalservicedesk@nhs.net + +

    + + +
    `; diff --git a/frontend/src/__tests__/app/message-plans/page.test.tsx b/frontend/src/__tests__/app/message-plans/page.test.tsx index 09c710a3f..52bfd58d9 100644 --- a/frontend/src/__tests__/app/message-plans/page.test.tsx +++ b/frontend/src/__tests__/app/message-plans/page.test.tsx @@ -9,6 +9,7 @@ import { import { serverIsFeatureEnabled } from '@utils/server-features'; import MessagePlansPage, { generateMetadata } from '@app/message-plans/page'; import { ReactElement } from 'react'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { RoutingConfig } from 'nhs-notify-backend-client'; jest.mock('@utils/message-plans'); @@ -72,17 +73,19 @@ describe('MessagePlansPage', () => { countRoutingConfigsMock.mockResolvedValueOnce(1).mockResolvedValueOnce(2); const page = (await MessagePlansPage()) as ReactElement< - MessagePlansProps, - typeof MessagePlans + { children: ReactElement }, + typeof NHSNotifyContainer >; + const messagePlansComponent = page.props.children; + expect(getRoutingConfigsMock).toHaveBeenCalledTimes(1); expect(countRoutingConfigsMock).toHaveBeenNthCalledWith(1, 'DRAFT'); expect(countRoutingConfigsMock).toHaveBeenNthCalledWith(2, 'COMPLETED'); - expect(page.props.draft).toEqual({ + expect(messagePlansComponent.props.draft).toEqual({ plans: [ { id: '1', @@ -94,7 +97,7 @@ describe('MessagePlansPage', () => { count: 1, }); - expect(page.props.production).toEqual({ + expect(messagePlansComponent.props.production).toEqual({ plans: [ { id: '2', diff --git a/frontend/src/__tests__/app/message-plans/preview-message-plan/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/message-plans/preview-message-plan/__snapshots__/page.test.tsx.snap index 7faa73e59..45d19e423 100644 --- a/frontend/src/__tests__/app/message-plans/preview-message-plan/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/message-plans/preview-message-plan/__snapshots__/page.test.tsx.snap @@ -2,781 +2,785 @@ exports[`full cascade plan matches snapshot 1`] = ` - - Back to all message plans - -
    -
    + Back to all message plans + +
    - - Message plan - -

    - Test config -

    -

    - You cannot edit this message plan because it's in production. -

    -
    -
    -
    -
    - Routing Plan ID -
    -
    - 39ee95ca-0500-4fe0-b1d6-c7f1b28bc267 -
    -
    + Message plan + +

    + Test config +

    -
    - Campaign -
    -
    - 042774eb-b2c0-4c63-856a-39f7fc31ad7f -
    +

    + You cannot edit this message plan because it's in production. +

    -
    -
    - Status -
    -
    + Routing Plan ID + +
    + 39ee95ca-0500-4fe0-b1d6-c7f1b28bc267 +
    +
    +
    - - Production - - -
    -
    -

    - -

    -
      -
    • + Campaign + +
      + 042774eb-b2c0-4c63-856a-39f7fc31ad7f +
      +
    -

    +

    +

    -
    +

    +
      +
    -
    - -
  • -
  • - - -
    - + +
    - - Fallback conditions - -
    + + Fallback conditions + + +
    +
      +
    • + + If first message read within 24 hours, no further messages sent. +
    • +
    • + + If first message not read within 24 hours, second message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Second message -

    -
    +

    + Second message +

    -

    - Email -

    -

    - email template name -

    -
    - + Email + +

    + email template name +

    +
    - - Preview - Email + Preview + + Email + + template - template - -
    -
    -
    -

    - message -

    - + +
    +
    +

    + message +

    + +
    -
    -
    + +
    - -
  • -
  • -
  • - - -
    - + +
    - - Fallback conditions - -
    + + Fallback conditions + + +
    +
      +
    • + + If second message delivered within 72 hours, no further messages sent. +
    • +
    • + + If second message not delivered within 72 hours, third message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Third message -

    -
    +

    + Third message +

    -

    - Text message (SMS) -

    -

    - sms template name -

    -
    - + Text message (SMS) + +

    + sms template name +

    +
    - - Preview - Text message (SMS) + Preview + + Text message (SMS) + + template - template - -
    -
    -
    -

    - message -

    - + +
    +
    +

    + message +

    + +
    -
    -
    + +
    - -
  • -
  • -
  • - - -
    - + +
    - + + Fallback conditions + +
    +
    - Fallback conditions - - +
      +
    • + + If third message delivered within 72 hours, no further messages sent. +
    • +
    • + + If third message not delivered within 72 hours, fourth message sent. +
    • +
    +
    +
    +
  • +
  • - -
  • -
  • - -

    - Fourth message -

    -
    +

    + Fourth message +

    - -
      -
    • - -
      - + +
      - - Conditions for accessible and language letters - -
      -
      -
        + Conditions for accessible and language letters + + +
        -
      • - - The relevant accessible or language letter will be sent instead of the standard English letter if, both: -
          -
        • - the recipient has requested an accessible or language letter in PDS -
        • -
        • - you've included the relevant template in this message plan -
        • -
        -
      • -
      -
      -
      -
    • -
    • -
      +
    • + + The relevant accessible or language letter will be sent instead of the standard English letter if, both: +
        +
      • + the recipient has requested an accessible or language letter in PDS +
      • +
      • + you've included the relevant template in this message plan +
      • +
      +
    • +
    + + +
  • +
  • -

    - Large print letter (optional) -

    -

    - - letter template name - -

    + Large print letter (optional) + +

    + + letter template name + +

    +
    - -
  • -
  • -
    +
  • -

    - Other language letters (optional) -

    -

    - - letter template name - -

    -

    - +

    + + letter template name + +

    +

    - letter template name - -

    + + letter template name + +

    +
    - -
  • - - - - - -
    + +
    `; diff --git a/frontend/src/__tests__/app/nhs-app-template-submitted/page.test.tsx b/frontend/src/__tests__/app/nhs-app-template-submitted/page.test.tsx index 88510a130..2c46bf899 100644 --- a/frontend/src/__tests__/app/nhs-app-template-submitted/page.test.tsx +++ b/frontend/src/__tests__/app/nhs-app-template-submitted/page.test.tsx @@ -4,6 +4,7 @@ import NhsAppTemplateSubmittedPage, { generateMetadata, } from '@app/nhs-app-template-submitted/[templateId]/page'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplateSubmitted } from '@molecules/TemplateSubmitted/TemplateSubmitted'; import { getTemplate } from '@utils/form-actions'; import { redirect } from 'next/navigation'; @@ -50,10 +51,12 @@ describe('NhsAppTemplateSubmittedPage', () => { expect(getTemplateMock).toHaveBeenCalledWith('template-id'); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-email-template/page.test.tsx b/frontend/src/__tests__/app/preview-email-template/page.test.tsx index f8e7ec655..f11027165 100644 --- a/frontend/src/__tests__/app/preview-email-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-email-template/page.test.tsx @@ -6,6 +6,7 @@ import PreviewEmailTemplatePage, { } from '@app/preview-email-template/[templateId]/page'; import { PreviewEmailTemplate } from '@forms/PreviewEmailTemplate'; import { EmailTemplate } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -62,7 +63,11 @@ describe('PreviewEmailTemplatePage', () => { expect(await generateMetadata()).toEqual({ title: pageTitle, }); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); it('should redirect to invalid-template when no templateId is found', async () => { diff --git a/frontend/src/__tests__/app/preview-letter-template/page.test.tsx b/frontend/src/__tests__/app/preview-letter-template/page.test.tsx index 992457a9a..a380fafc1 100644 --- a/frontend/src/__tests__/app/preview-letter-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-letter-template/page.test.tsx @@ -9,6 +9,7 @@ import { type PdfLetterTemplate, type LetterTemplate, } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { Language, LetterType, TemplateDto } from 'nhs-notify-backend-client'; @@ -77,7 +78,11 @@ describe('PreviewLetterTemplatePage', () => { title: pageTitle, }); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); it('should load page with authoring letter template', async () => { @@ -90,7 +95,9 @@ describe('PreviewLetterTemplatePage', () => { }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-nhs-app-template/page.test.tsx b/frontend/src/__tests__/app/preview-nhs-app-template/page.test.tsx index 7e501f30f..077a7086a 100644 --- a/frontend/src/__tests__/app/preview-nhs-app-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-nhs-app-template/page.test.tsx @@ -6,6 +6,7 @@ import PreviewNhsAppTemplatePage, { } from '@app/preview-nhs-app-template/[templateId]/page'; import { PreviewNHSAppTemplate } from '@forms/PreviewNHSAppTemplate/PreviewNHSAppTemplate'; import { NHSAppTemplate } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -61,7 +62,9 @@ describe('PreviewNhsAppTemplatePage', () => { title: pageTitle, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-submitted-email-template/page.test.tsx b/frontend/src/__tests__/app/preview-submitted-email-template/page.test.tsx index 0f19ae66f..5554ddd52 100644 --- a/frontend/src/__tests__/app/preview-submitted-email-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-submitted-email-template/page.test.tsx @@ -16,6 +16,7 @@ import { import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsEmail from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsEmail'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewEmailTemplate; @@ -60,10 +61,12 @@ describe('ViewSubmittedEmailTemplatePage', () => { title: pageTitle, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-submitted-letter-template/page.test.tsx b/frontend/src/__tests__/app/preview-submitted-letter-template/page.test.tsx index 5237accce..327127bf6 100644 --- a/frontend/src/__tests__/app/preview-submitted-letter-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-submitted-letter-template/page.test.tsx @@ -18,6 +18,7 @@ import { import content from '@content/content'; import PreviewTemplateDetailsLetter from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsLetter'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewLetterTemplate; @@ -68,10 +69,12 @@ describe('PreviewSubmittedLetterTemplatePage', () => { title: pageTitle, }); expect(page).toEqual( - + + + ); }); @@ -90,10 +93,12 @@ describe('PreviewSubmittedLetterTemplatePage', () => { }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-submitted-nhs-app-template/page.test.tsx b/frontend/src/__tests__/app/preview-submitted-nhs-app-template/page.test.tsx index 5ec7ca7fc..674f74bbd 100644 --- a/frontend/src/__tests__/app/preview-submitted-nhs-app-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-submitted-nhs-app-template/page.test.tsx @@ -16,6 +16,7 @@ import { import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsNhsApp from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsNhsApp'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewNHSAppTemplate; @@ -58,10 +59,12 @@ describe('PreviewSubmittedNHSAppTemplatePage', () => { title: pageTitle, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-submitted-text-message-template/page.test.tsx b/frontend/src/__tests__/app/preview-submitted-text-message-template/page.test.tsx index c31651a34..e03a2f45e 100644 --- a/frontend/src/__tests__/app/preview-submitted-text-message-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-submitted-text-message-template/page.test.tsx @@ -16,6 +16,7 @@ import { import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsSms from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsSms'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewSMSTemplate; @@ -58,10 +59,12 @@ describe('PreviewSubmittedSMSTemplatePage', () => { title: pageTitle, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/preview-text-message-template/page.test.tsx b/frontend/src/__tests__/app/preview-text-message-template/page.test.tsx index 66b27848d..ea0427b52 100644 --- a/frontend/src/__tests__/app/preview-text-message-template/page.test.tsx +++ b/frontend/src/__tests__/app/preview-text-message-template/page.test.tsx @@ -6,6 +6,7 @@ import PreviewSMSTemplatePage, { } from '@app/preview-text-message-template/[templateId]/page'; import { PreviewSMSTemplate } from '@forms/PreviewSMSTemplate'; import { SMSTemplate } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -60,7 +61,11 @@ describe('PreviewSMSTemplatePage', () => { expect(await generateMetadata()).toEqual({ title: pageTitle, }); - expect(page).toEqual(); + expect(page).toEqual( + + + + ); }); it('should redirect to invalid-template when no template is found', async () => { diff --git a/frontend/src/__tests__/app/request-proof-of-template/page.test.tsx b/frontend/src/__tests__/app/request-proof-of-template/page.test.tsx index 10be62db3..f691dccc5 100644 --- a/frontend/src/__tests__/app/request-proof-of-template/page.test.tsx +++ b/frontend/src/__tests__/app/request-proof-of-template/page.test.tsx @@ -5,6 +5,7 @@ import RequestProofPage, { generateMetadata, } from '@app/request-proof-of-template/[templateId]/page'; import { RequestProof } from '@forms/RequestProof/RequestProof'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -75,12 +76,14 @@ describe('RequestProofPage', () => { }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/submit-email-template/page.test.tsx b/frontend/src/__tests__/app/submit-email-template/page.test.tsx index 615f2242b..d361b58cf 100644 --- a/frontend/src/__tests__/app/submit-email-template/page.test.tsx +++ b/frontend/src/__tests__/app/submit-email-template/page.test.tsx @@ -5,6 +5,7 @@ import SubmitEmailTemplatePage, { generateMetadata, } from '@app/submit-email-template/[templateId]/page'; import { SubmitDigitalTemplate } from '@forms/SubmitTemplate/SubmitDigitalTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -55,12 +56,14 @@ describe('SubmitEmailTemplatePage', () => { title: pageTitle.EMAIL, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/submit-letter-template/page.test.tsx b/frontend/src/__tests__/app/submit-letter-template/page.test.tsx index 23abea1fe..48bc5d165 100644 --- a/frontend/src/__tests__/app/submit-letter-template/page.test.tsx +++ b/frontend/src/__tests__/app/submit-letter-template/page.test.tsx @@ -5,6 +5,7 @@ import SubmitLetterTemplatePage, { generateMetadata, } from '@app/submit-letter-template/[templateId]/page'; import { SubmitLetterTemplate } from '@forms/SubmitTemplate/SubmitLetterTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -48,11 +49,13 @@ describe('SubmitLetterTemplatePage', () => { }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/submit-nhs-app-template/page.test.tsx b/frontend/src/__tests__/app/submit-nhs-app-template/page.test.tsx index 9b12128a8..28a9def05 100644 --- a/frontend/src/__tests__/app/submit-nhs-app-template/page.test.tsx +++ b/frontend/src/__tests__/app/submit-nhs-app-template/page.test.tsx @@ -5,6 +5,7 @@ import SubmitNhsAppTemplatePage, { generateMetadata, } from '@app/submit-nhs-app-template/[templateId]/page'; import { SubmitDigitalTemplate } from '@forms/SubmitTemplate/SubmitDigitalTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -57,12 +58,14 @@ describe('SubmitNhsAppTemplatePage', () => { title: pageTitle.NHS_APP, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/submit-text-message-template/page.test.tsx b/frontend/src/__tests__/app/submit-text-message-template/page.test.tsx index e0516d387..d91f6b88f 100644 --- a/frontend/src/__tests__/app/submit-text-message-template/page.test.tsx +++ b/frontend/src/__tests__/app/submit-text-message-template/page.test.tsx @@ -5,6 +5,7 @@ import SubmitSmsTemplatePage, { generateMetadata, } from '@app/submit-text-message-template/[templateId]/page'; import { SubmitDigitalTemplate } from '@forms/SubmitTemplate/SubmitDigitalTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { redirect } from 'next/navigation'; import { getTemplate } from '@utils/form-actions'; import { TemplateDto } from 'nhs-notify-backend-client'; @@ -55,12 +56,14 @@ describe('SubmitSmsTemplatePage', () => { title: pageTitle.SMS, }); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/text-message-template-submitted/page.test.tsx b/frontend/src/__tests__/app/text-message-template-submitted/page.test.tsx index 0a8568909..5fdb555fc 100644 --- a/frontend/src/__tests__/app/text-message-template-submitted/page.test.tsx +++ b/frontend/src/__tests__/app/text-message-template-submitted/page.test.tsx @@ -4,6 +4,7 @@ import SmsTemplateSubmittedPage, { generateMetadata, } from '@app/text-message-template-submitted/[templateId]/page'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplateSubmitted } from '@molecules/TemplateSubmitted/TemplateSubmitted'; import { getTemplate } from '@utils/form-actions'; import { redirect } from 'next/navigation'; @@ -50,10 +51,12 @@ describe('TextMessageTemplateSubmittedPage', () => { expect(getTemplateMock).toHaveBeenCalledWith('template-id'); expect(page).toEqual( - + + + ); }); diff --git a/frontend/src/__tests__/app/upload-british-sign-language-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/upload-british-sign-language-letter-template/__snapshots__/page.test.tsx.snap index 50bc4c0ca..f30d52324 100644 --- a/frontend/src/__tests__/app/upload-british-sign-language-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/upload-british-sign-language-letter-template/__snapshots__/page.test.tsx.snap @@ -2,1049 +2,1065 @@ exports[`client has multiple campaign ids matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload a British Sign Language letter template -

    +

    + Upload a British Sign Language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + Choose which campaign this letter is for
    -
    - -
    -
    - + +
    - Choose which campaign this letter is for + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -
    -
    -
    - -
    - - + Save your Microsoft Word file and upload it to this page. + + + +
    + +
    +`; + +exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload a British Sign Language letter template -

    +

    + Upload a British Sign Language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - Choose which campaign this letter is for +
    - + +
    + Choose which campaign this letter is for +
    - Error: + + Error: + + Choose a campaign - Choose a campaign -
    - -
    -
    - -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. + + +
    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create a British Sign Language letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; exports[`client has one campaign id matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload a British Sign Language letter template -

    +

    + Upload a British Sign Language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

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

    + Campaign 1 +

    +
    - This message plan will link to your only campaign: + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -

    - Campaign 1 -

    -
    -
    + +
    +
    +

    + How to create a British Sign Language letter template +

    +
      - -
      + blank letter template file (opens in a new tab) + + . + +
    1. - Only upload your final letter template file. -
      - Make sure you use one of our blank template files to create the letter. -
    2. - -
    - - + Add + + formatting (opens in a new tab) + + . + +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    +
    + +
    +`; + +exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload a British Sign Language letter template -

    +

    + Upload a British Sign Language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - This message plan will link to your only campaign: +
    - -

    - Campaign 1 -

    -
    -
    -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. + +
    + This message plan will link to your only campaign: +
    + +

    + Campaign 1 +

    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create a British Sign Language letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/upload-large-print-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/upload-large-print-letter-template/__snapshots__/page.test.tsx.snap index 81e3d8a2c..055a86f9c 100644 --- a/frontend/src/__tests__/app/upload-large-print-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/upload-large-print-letter-template/__snapshots__/page.test.tsx.snap @@ -2,1049 +2,1065 @@ exports[`client has multiple campaign ids matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload a large print letter template -

    +

    + Upload a large print letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + Choose which campaign this letter is for
    -
    - -
    -
    - + +
    - Choose which campaign this letter is for + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -
    -
    -
    - -
    - - + Save your Microsoft Word file and upload it to this page. + + + +
    + +
    +`; + +exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload a large print letter template -

    +

    + Upload a large print letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - Choose which campaign this letter is for +
    - + +
    + Choose which campaign this letter is for +
    - Error: + + Error: + + Choose a campaign - Choose a campaign -
    - -
    -
    - -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. + + +
    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create a large print letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; exports[`client has one campaign id matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload a large print letter template -

    +

    + Upload a large print letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

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

    + Campaign 1 +

    +
    - This message plan will link to your only campaign: + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -

    - Campaign 1 -

    -
    -
    + +
    +
    +

    + How to create a large print letter template +

    +
      - -
      + blank letter template file (opens in a new tab) + + . + +
    1. - Only upload your final letter template file. -
      - Make sure you use one of our blank template files to create the letter. -
    2. - -
    - - + Add + + formatting (opens in a new tab) + + . + +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    +
    + +
    +`; + +exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload a large print letter template -

    +

    + Upload a large print letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - This message plan will link to your only campaign: +
    - -

    - Campaign 1 -

    -
    -
    -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. + +
    + This message plan will link to your only campaign: +
    + +

    + Campaign 1 +

    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create a large print letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/upload-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/upload-letter-template/__snapshots__/page.test.tsx.snap index eedb450fd..9dc9345bd 100644 --- a/frontend/src/__tests__/app/upload-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/upload-letter-template/__snapshots__/page.test.tsx.snap @@ -1,42 +1,46 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`UploadLetterTemplatePage should render UploadLetterTemplatePage when one campaignId is available 1`] = ` - + + initialState={ + { + "campaignId": "campaign-id", + "language": "en", + "letterType": "x0", + "letterVersion": "PDF", + "name": "", + "templateType": "LETTER", + } + } + /> + `; exports[`UploadLetterTemplatePage should render UploadLetterTemplatePage with multiple campaignIds available 1`] = ` - + + /> + `; diff --git a/frontend/src/__tests__/app/upload-letter-template/client-id-and-campaign-id-required/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/upload-letter-template/client-id-and-campaign-id-required/__snapshots__/page.test.tsx.snap index 2f35cfe4c..c2171cc00 100644 --- a/frontend/src/__tests__/app/upload-letter-template/client-id-and-campaign-id-required/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/upload-letter-template/client-id-and-campaign-id-required/__snapshots__/page.test.tsx.snap @@ -2,44 +2,48 @@ exports[`ClientIdAndCampaignIdRequiredPage 1`] = ` -
    -
    -

    - You cannot create letter templates yet -

    -

    - To get access, contact your onboarding manager and give them this error message: -

    +

    + You cannot create letter templates yet +

    - Account needs a client ID and campaign ID + To get access, contact your onboarding manager and give them this error message:

    -
    -

    - - Go back - -

    +

    + Account needs a client ID and campaign ID +

    +
    +

    + + Go back + +

    +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/upload-other-language-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/upload-other-language-letter-template/__snapshots__/page.test.tsx.snap index 0f0634694..3c4b115be 100644 --- a/frontend/src/__tests__/app/upload-other-language-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/upload-other-language-letter-template/__snapshots__/page.test.tsx.snap @@ -2,2157 +2,2177 @@ exports[`client has multiple campaign ids matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload an other language letter template -

    +

    + Upload an other language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + class="nhsuk-hint" + > + This will not be visible to recipients
    -
    - -
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    + +
    - Choose which campaign this letter is for + +
    + Choose which campaign this letter is for +
    +
    - -
    -
    - + Template language + +
    + Choose the language used in this template +
    + +
    - Choose the language used in this template + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -
    -
    + Upload letter template file + + +
    +
    +

    -

    - - - - + Add + + formatting (opens in a new tab) + + . + +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + + +
    + +
    +`; + +exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload an other language letter template -

    +

    + Upload an other language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + class="nhsuk-hint" + > + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - Choose which campaign this letter is for +
    - + +
    + Choose which campaign this letter is for +
    - Error: + + Error: + + Choose a campaign - Choose a campaign -
    - -
    -
    - -
    - Choose the language used in this template +
    - + +
    + Choose the language used in this template +
    - Error: + + Error: + + Choose a language - Choose a language -
    - -
    -
    - -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. +
    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create an other language letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; exports[`client has one campaign id matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload an other language letter template -

    +

    + Upload an other language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + class="nhsuk-hint" + > + This message plan will link to your only campaign:
    -
    - -
    -
    - + +

    + Campaign 1 +

    +
    - This message plan will link to your only campaign: + +
    + Choose the language used in this template +
    +
    - -

    - Campaign 1 -

    -
    -
    -
    - Choose the language used in this template + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -
    -
    + Upload letter template file + + +
    +
    +

    + How to create an other language letter template +

    +
      - -
      + blank letter template file (opens in a new tab) + + . + +
    1. - Only upload your final letter template file. -
      - Make sure you use one of our blank template files to create the letter. -
    2. - -
    - - + Add + + formatting (opens in a new tab) + + . + +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    +
    + +
    +`; + +exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload an other language letter template -

    +

    + Upload an other language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + class="nhsuk-hint" + > + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - This message plan will link to your only campaign: +
    - -

    - Campaign 1 -

    -
    -
    -
    - Choose the language used in this template + +
    + This message plan will link to your only campaign: +
    + +

    + Campaign 1 +

    - + +
    + Choose the language used in this template +
    - Error: + + Error: + + Choose a language - Choose a language -
    - -
    -
    - -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. +
    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create an other language letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; exports[`client has one campaign id renders the rtl template link if an rtl language is selected 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload an other language letter template -

    +

    + Upload an other language letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + class="nhsuk-hint" + > + This message plan will link to your only campaign:
    -
    - -
    -
    - + +

    + Campaign 1 +

    +
    - This message plan will link to your only campaign: + +
    + Choose the language used in this template +
    +
    - -

    - Campaign 1 -

    -
    -
    -
    - Choose the language used in this template + + Information: + +

    + + Right-to-left language selected + +

    +

    + You've selected a language that reads right-to-left. Make sure you use the + + other language (right-aligned) letter template file (opens in a new tab) + + . +

    - -
    -
    + Template file + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    + +
    + + +
    +
    +

    + How to create an other language letter template +

    +
      - - Information: - -

      - - Right-to-left language selected - -

      -

      - You've selected a language that reads right-to-left. Make sure you use the + Download the relevant - other language (right-aligned) letter template file (opens in a new tab) + blank letter template file (opens in a new tab) . -

      -
    -
    - -
    +
  • - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. -
  • - -
    - - - -
    -

    - How to create an other language letter template -

    -
      -
    1. - Download the relevant - - blank letter template file (opens in a new tab) - - . -
    2. -
    3. - Add - - formatting (opens in a new tab) - - . -
    4. -
    5. - Add any - + formatting (opens in a new tab) + + . +
    6. +
    7. - personalisation (opens in a new tab) - - . -
    8. -
    9. - Save your Microsoft Word file and upload it to this page. -
    10. -
    + Add any + + personalisation (opens in a new tab) + + . + +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; diff --git a/frontend/src/__tests__/app/upload-standard-english-letter-template/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/upload-standard-english-letter-template/__snapshots__/page.test.tsx.snap index 22b555fba..21b248f90 100644 --- a/frontend/src/__tests__/app/upload-standard-english-letter-template/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/upload-standard-english-letter-template/__snapshots__/page.test.tsx.snap @@ -2,1049 +2,1065 @@ exports[`client has multiple campaign ids matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload a standard English letter template -

    +

    + Upload a standard English letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + Choose which campaign this letter is for
    -
    - -
    -
    - + +
    - Choose which campaign this letter is for + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -
    -
    -
    - -
    - - + Save your Microsoft Word file and upload it to this page. + + + +
    + +
    +`; + +exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has multiple campaign ids renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload a standard English letter template -

    +

    + Upload a standard English letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - Choose which campaign this letter is for +
    - + +
    + Choose which campaign this letter is for +
    - Error: + + Error: + + Choose a campaign - Choose a campaign -
    - -
    -
    - -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. + + +
    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create a standard English letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; exports[`client has one campaign id matches snapshot on initial render 1`] = ` - - Back to choose a template type - -
    -
    + Back to choose a template type + +
    -

    - Upload a standard English letter template -

    +

    + Upload a standard English letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients + +
    + This will not be visible to recipients +
    +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    +
    -
    - - - Naming your templates - - + Campaign +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

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

    + Campaign 1 +

    +
    - This message plan will link to your only campaign: + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    +
    - -

    - Campaign 1 -

    -
    -
    + +
    +
    +

    + How to create a standard English letter template +

    +
      - -
      + blank letter template file (opens in a new tab) + + . + +
    1. - Only upload your final letter template file. -
      - Make sure you use one of our blank template files to create the letter. -
    2. - -
    - - + Add + + formatting (opens in a new tab) + + . + +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    +
    + +
    +`; + +exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` + +
    + + Back to choose a template type + +
    -
    - -
    -`; - -exports[`client has one campaign id renders errors when blank form is submitted and error state is returned 1`] = ` - - - Back to choose a template type - -
    - -
    -

    - Upload a standard English letter template -

    +

    + Upload a standard English letter template +

    +
    - -
    -
    - - -
    - + +
    - This will not be visible to recipients -
    -
    - - - Naming your templates - - + Template name +
    -

    - You should name your templates in a way that works best for your service or organisation. -

    -

    - Common template names include the: -

    -
      -
    • - subject or reason for the message -
    • -
    • - intended audience for the template -
    • -
    • - version number of the template -
    • -
    -

    - For example, 'Covid19 2025 - over 65s - version 3' -

    + This will not be visible to recipients
    -
    - +
    + + + Naming your templates + + +
    +

    + You should name your templates in a way that works best for your service or organisation. +

    +

    + Common template names include the: +

    +
      +
    • + subject or reason for the message +
    • +
    • + intended audience for the template +
    • +
    • + version number of the template +
    • +
    +

    + For example, 'Covid19 2025 - over 65s - version 3' +

    +
    +
    - Error: + + Error: + + Enter a template name - Enter a template name -
    - -
    -
    - -
    - This message plan will link to your only campaign: +
    - -

    - Campaign 1 -

    -
    -
    -
    - Only upload your final letter template file. -
    - Make sure you use one of our blank template files to create the letter. + +
    + This message plan will link to your only campaign: +
    + +

    + Campaign 1 +

    - + +
    + Only upload your final letter template file. +
    + Make sure you use one of our blank template files to create the letter. +
    - Error: + + Error: + + Choose a template file - Choose a template file -
    - -
    - -
    -
    -
    -

    - How to create a standard English letter template -

    -
      +
    + + +
    +
    -
  • - Download the relevant - - blank letter template file (opens in a new tab) - - . -
  • -
  • +
      - Add - - formatting (opens in a new tab) - - . - -
    1. - Add any - + blank letter template file (opens in a new tab) + + . +
    2. +
    3. - personalisation (opens in a new tab) - - . -
    4. -
    5. - Save your Microsoft Word file and upload it to this page. -
    6. -
    + Add + + formatting (opens in a new tab) + + . +
  • +
  • + Add any + + personalisation (opens in a new tab) + + . +
  • +
  • + Save your Microsoft Word file and upload it to this page. +
  • + +
    - -
    + +
    `; diff --git a/frontend/src/app/choose-a-template-type/page.tsx b/frontend/src/app/choose-a-template-type/page.tsx index 60b6cfa28..ab54e8d1f 100644 --- a/frontend/src/app/choose-a-template-type/page.tsx +++ b/frontend/src/app/choose-a-template-type/page.tsx @@ -4,6 +4,7 @@ import { ChooseTemplateType } from '@forms/ChooseTemplateType/ChooseTemplateType import { Metadata } from 'next'; import { TEMPLATE_TYPE_LIST } from 'nhs-notify-backend-client'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.chooseTemplateType; @@ -14,7 +15,11 @@ export async function generateMetadata(): Promise { } const ChooseATemplateTypePage = async () => { - return ; + return ( + + + + ); }; export default ChooseATemplateTypePage; diff --git a/frontend/src/app/copy-template/[templateId]/page.tsx b/frontend/src/app/copy-template/[templateId]/page.tsx index 62889fe79..d034f795d 100644 --- a/frontend/src/app/copy-template/[templateId]/page.tsx +++ b/frontend/src/app/copy-template/[templateId]/page.tsx @@ -7,6 +7,7 @@ import { validateTemplate, } from 'nhs-notify-web-template-management-utils'; import { getTemplate } from '@utils/form-actions'; +import { NHSNotifyContainer } from '@layouts/container/container'; const CopyTemplatePage = async (props: TemplatePageProps) => { const { templateId } = await props.params; @@ -23,7 +24,11 @@ const CopyTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default CopyTemplatePage; diff --git a/frontend/src/app/create-and-submit-templates/page.tsx b/frontend/src/app/create-and-submit-templates/page.tsx index 5ee072798..b79856cc4 100644 --- a/frontend/src/app/create-and-submit-templates/page.tsx +++ b/frontend/src/app/create-and-submit-templates/page.tsx @@ -2,6 +2,7 @@ import { NHSNotifyButton } from '@atoms/NHSNotifyButton/NHSNotifyButton'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import content from '@content/content'; import { Metadata } from 'next'; +import { NHSNotifyContainer } from '@layouts/container/container'; const homePageContent = content.pages.homePage; @@ -11,39 +12,41 @@ export const metadata: Metadata = { export default function HomePage() { return ( - -
    -
    -

    - {homePageContent.pageHeading} -

    + + +
    +
    +

    + {homePageContent.pageHeading} +

    -

    {homePageContent.text1}

    -

    {homePageContent.text2}

    +

    {homePageContent.text1}

    +

    {homePageContent.text2}

    -
      - {homePageContent.channelList.map((channel, i) => ( -
    • {channel}
    • - ))} -
    +
      + {homePageContent.channelList.map((channel, i) => ( +
    • {channel}
    • + ))} +
    -

    {homePageContent.text3}

    -

    - {homePageContent.pageSubHeading} -

    -

    {homePageContent.text4}

    -

    {homePageContent.text5}

    -

    {homePageContent.text6}

    -

    {homePageContent.text7}

    +

    {homePageContent.text3}

    +

    + {homePageContent.pageSubHeading} +

    +

    {homePageContent.text4}

    +

    {homePageContent.text5}

    +

    {homePageContent.text6}

    +

    {homePageContent.text7}

    - - {homePageContent.linkButton.text} - + + {homePageContent.linkButton.text} + +
    -
    - + + ); } diff --git a/frontend/src/app/create-email-template/page.tsx b/frontend/src/app/create-email-template/page.tsx index 009844681..5b06fe777 100644 --- a/frontend/src/app/create-email-template/page.tsx +++ b/frontend/src/app/create-email-template/page.tsx @@ -2,6 +2,7 @@ import { Metadata } from 'next'; import { EmailTemplateForm } from '@forms/EmailTemplateForm/EmailTemplateForm'; import { CreateUpdateEmailTemplate } from 'nhs-notify-web-template-management-utils'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.templateFormEmail; @@ -19,7 +20,11 @@ const CreateEmailTemplatePage = async () => { message: '', }; - return ; + return ( + + + + ); }; export default CreateEmailTemplatePage; diff --git a/frontend/src/app/create-nhs-app-template/page.tsx b/frontend/src/app/create-nhs-app-template/page.tsx index aa556f894..2f12fc507 100644 --- a/frontend/src/app/create-nhs-app-template/page.tsx +++ b/frontend/src/app/create-nhs-app-template/page.tsx @@ -2,6 +2,7 @@ import { NhsAppTemplateForm } from '@forms/NhsAppTemplateForm/NhsAppTemplateForm import { Metadata } from 'next'; import { CreateUpdateNHSAppTemplate } from 'nhs-notify-web-template-management-utils'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.templateFormNhsApp; @@ -18,7 +19,11 @@ const CreateNHSAppTemplatePage = async () => { message: '', }; - return ; + return ( + + + + ); }; export default CreateNHSAppTemplatePage; diff --git a/frontend/src/app/create-text-message-template/page.tsx b/frontend/src/app/create-text-message-template/page.tsx index b010c9466..95a79b559 100644 --- a/frontend/src/app/create-text-message-template/page.tsx +++ b/frontend/src/app/create-text-message-template/page.tsx @@ -2,6 +2,7 @@ import { Metadata } from 'next'; import { SmsTemplateForm } from '@forms/SmsTemplateForm/SmsTemplateForm'; import { CreateUpdateSMSTemplate } from 'nhs-notify-web-template-management-utils'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.templateFormSms; @@ -18,7 +19,11 @@ const CreateSMSTemplatePage = async () => { message: '', }; - return ; + return ( + + + + ); }; export default CreateSMSTemplatePage; diff --git a/frontend/src/app/delete-template-error/[templateId]/page.tsx b/frontend/src/app/delete-template-error/[templateId]/page.tsx index 931b0d9b6..092430c7f 100644 --- a/frontend/src/app/delete-template-error/[templateId]/page.tsx +++ b/frontend/src/app/delete-template-error/[templateId]/page.tsx @@ -6,6 +6,7 @@ import { getTemplate } from '@utils/form-actions'; import { getRoutingConfigReferencesByTemplateId } from '@utils/message-plans'; import DeleteTemplateError from '@molecules/DeleteTemplateError/DeleteTemplateError'; import { TemplatePageProps } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import content from '@content/content'; const title = content.pages.deleteTemplateErrorPage.pageTitle; @@ -34,9 +35,11 @@ export default async function DeleteTemplateErrorPage( } return ( - + + + ); } diff --git a/frontend/src/app/delete-template/[templateId]/page.tsx b/frontend/src/app/delete-template/[templateId]/page.tsx index feaa42e11..872f3986a 100644 --- a/frontend/src/app/delete-template/[templateId]/page.tsx +++ b/frontend/src/app/delete-template/[templateId]/page.tsx @@ -7,6 +7,7 @@ import { import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import { DeleteTemplate } from '@forms/DeleteTemplate/DeleteTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; const DeleteTemplatePage = async (props: TemplatePageProps) => { const { templateId } = await props.params; @@ -23,7 +24,11 @@ const DeleteTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default DeleteTemplatePage; diff --git a/frontend/src/app/edit-email-template/[templateId]/page.tsx b/frontend/src/app/edit-email-template/[templateId]/page.tsx index f98ace6e0..ad2dfad61 100644 --- a/frontend/src/app/edit-email-template/[templateId]/page.tsx +++ b/frontend/src/app/edit-email-template/[templateId]/page.tsx @@ -1,4 +1,5 @@ import { EmailTemplateForm } from '@forms/EmailTemplateForm/EmailTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplatePageProps, validateEmailTemplate, @@ -27,7 +28,11 @@ const CreateEmailTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default CreateEmailTemplatePage; diff --git a/frontend/src/app/edit-nhs-app-template/[templateId]/page.tsx b/frontend/src/app/edit-nhs-app-template/[templateId]/page.tsx index 78c722bb2..c470bb9a6 100644 --- a/frontend/src/app/edit-nhs-app-template/[templateId]/page.tsx +++ b/frontend/src/app/edit-nhs-app-template/[templateId]/page.tsx @@ -2,6 +2,7 @@ import { Metadata } from 'next'; import { NhsAppTemplateForm } from '@forms/NhsAppTemplateForm/NhsAppTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplatePageProps, validateNHSAppTemplate, @@ -29,7 +30,11 @@ const CreateNhsAppTemplatePage = async (props: TemplatePageProps) => { redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default CreateNhsAppTemplatePage; diff --git a/frontend/src/app/edit-template-name/[templateId]/page.tsx b/frontend/src/app/edit-template-name/[templateId]/page.tsx index 2b558f7cd..d829fd405 100644 --- a/frontend/src/app/edit-template-name/[templateId]/page.tsx +++ b/frontend/src/app/edit-template-name/[templateId]/page.tsx @@ -2,6 +2,7 @@ import type { Metadata } from 'next'; import Link from 'next/link'; import { redirect, RedirectType } from 'next/navigation'; import type { TemplatePageProps } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { HintText, Label } from '@atoms/nhsuk-components'; import { NHSNotifyButton } from '@atoms/NHSNotifyButton/NHSNotifyButton'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; @@ -55,58 +56,60 @@ export default async function EditTemplateNamePage({ } return ( - - - -
    -
    - - - - - - {content.form.name.hint} - - - - + + + +
    +
    + + + - - - - {content.form.submit.text} - - - {content.backLink.text} - - - + + + {content.form.name.hint} + + + + + + + + {content.form.submit.text} + + + {content.backLink.text} + + + +
    -
    - - + + + ); } diff --git a/frontend/src/app/edit-text-message-template/[templateId]/page.tsx b/frontend/src/app/edit-text-message-template/[templateId]/page.tsx index eced101a2..3b74b9db4 100644 --- a/frontend/src/app/edit-text-message-template/[templateId]/page.tsx +++ b/frontend/src/app/edit-text-message-template/[templateId]/page.tsx @@ -1,6 +1,7 @@ 'use server'; import { SmsTemplateForm } from '@forms/SmsTemplateForm/SmsTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { TemplatePageProps, validateSMSTemplate, @@ -29,7 +30,11 @@ const CreateSmsTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default CreateSmsTemplatePage; diff --git a/frontend/src/app/email-template-submitted/[templateId]/page.tsx b/frontend/src/app/email-template-submitted/[templateId]/page.tsx index 0f0713cf5..9dfd05ec6 100644 --- a/frontend/src/app/email-template-submitted/[templateId]/page.tsx +++ b/frontend/src/app/email-template-submitted/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.templateSubmitted; @@ -31,7 +32,11 @@ const EmailTemplateSubmittedPage = async (props: TemplatePageProps) => { const { id, name } = validatedTemplate; - return ; + return ( + + + + ); }; export default EmailTemplateSubmittedPage; diff --git a/frontend/src/app/invalid-template/page.tsx b/frontend/src/app/invalid-template/page.tsx index 57905ce0a..279eaf421 100644 --- a/frontend/src/app/invalid-template/page.tsx +++ b/frontend/src/app/invalid-template/page.tsx @@ -1,7 +1,12 @@ 'use client'; import { ErrorPage404 } from '@molecules/404/404'; +import { NHSNotifyContainer } from '@layouts/container/container'; -const InvalidTemplatePage = () => ; +const InvalidTemplatePage = () => ( + + + +); export default InvalidTemplatePage; diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 77e4b37e1..92a234245 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -7,7 +7,7 @@ import { AuthProvider } from '@providers/auth-provider'; import { ClientConfigProviderServer } from '@providers/client-config-provider-server'; import { NHSNotifySkipLink } from '@atoms/NHSNotifySkipLink/NHSNotifySkipLink'; import { NhsNotifyHeader } from '@molecules/Header/Header'; -import { NHSNotifyContainer } from '@layouts/container/container'; + import { NHSNotifyFooter } from '@molecules/Footer/Footer'; import { LogoutWarningModal } from '@molecules/LogoutWarningModal/LogoutWarningModal'; @@ -70,7 +70,7 @@ export default function RootLayout({ - {children} + {children} { const { id, name } = validatedTemplate; - return ; + return ( + + + + ); }; export default LetterTemplateSubmittedPage; diff --git a/frontend/src/app/message-plans/campaign-id-required/page.tsx b/frontend/src/app/message-plans/campaign-id-required/page.tsx index 88159f50d..80f591a8b 100644 --- a/frontend/src/app/message-plans/campaign-id-required/page.tsx +++ b/frontend/src/app/message-plans/campaign-id-required/page.tsx @@ -1,5 +1,6 @@ import type { Metadata } from 'next'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import InvalidConfig from '@molecules/InvalidConfig/InvalidConfig'; const pageContent = content.pages.messagePlanInvalidConfiguration; @@ -9,5 +10,9 @@ export const metadata: Metadata = { }; export default function MessagePlanCampaignIdRequiredPage() { - return ; + return ( + + + + ); } diff --git a/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/page.tsx index c6c26d6a1..0c25de69e 100644 --- a/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/page.tsx @@ -7,6 +7,7 @@ import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; import { ChooseChannelTemplate } from '@forms/ChooseChannelTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { getTemplates } from '@utils/form-actions'; import { $LockNumber } from 'nhs-notify-backend-client'; const { pageTitle, pageHeading, noTemplatesText } = @@ -51,13 +52,15 @@ export default async function ChooseEmailTemplate(props: MessagePlanPageProps) { }); return ( - + + + ); } diff --git a/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/preview-template/[templateId]/page.tsx b/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/preview-template/[templateId]/page.tsx index 24c601402..394279058 100644 --- a/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/preview-template/[templateId]/page.tsx +++ b/frontend/src/app/message-plans/choose-email-template/[routingConfigId]/preview-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import PreviewTemplateDetailsEmail from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsEmail'; import { PreviewTemplateFromMessagePlan } from '@molecules/PreviewTemplateFromMessagePlan/PreviewTemplateFromMessagePlan'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { $LockNumber } from 'nhs-notify-backend-client'; const { pageTitle } = content.components.previewEmailTemplate; @@ -44,12 +45,14 @@ const PreviewEmailTemplateFromMessagePlan = async ( } return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/page.tsx index 67148bee3..d3e3db344 100644 --- a/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/page.tsx @@ -7,6 +7,7 @@ import { redirect, RedirectType } from 'next/navigation'; import { ChooseChannelTemplate } from '@forms/ChooseChannelTemplate'; import { getTemplates } from '@utils/form-actions'; import { $LockNumber } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; import content from '@content/content'; const { pageTitle, pageHeading, noTemplatesText } = @@ -57,14 +58,16 @@ export default async function ChooseLargePrintLetterTemplate( } return ( - + + + ); } diff --git a/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx b/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx index fcef16d78..9ff7d8e22 100644 --- a/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx +++ b/frontend/src/app/message-plans/choose-large-print-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx @@ -11,6 +11,7 @@ import content from '@content/content'; import { PreviewTemplateFromMessagePlan } from '@molecules/PreviewTemplateFromMessagePlan/PreviewTemplateFromMessagePlan'; import PreviewTemplateDetailsLetter from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsLetter'; import { $LockNumber } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.pages.previewLargePrintLetterTemplate; @@ -44,12 +45,14 @@ const PreviewLargePrintLetterTemplateFromMessagePlan = async ( } return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/choose-message-order/page.tsx b/frontend/src/app/message-plans/choose-message-order/page.tsx index bad190f90..a401c91bb 100644 --- a/frontend/src/app/message-plans/choose-message-order/page.tsx +++ b/frontend/src/app/message-plans/choose-message-order/page.tsx @@ -3,6 +3,7 @@ import { ChooseMessageOrder } from '@forms/ChooseMessageOrder/ChooseMessageOrder'; import { Metadata } from 'next'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.chooseMessageOrder; @@ -13,7 +14,11 @@ export async function generateMetadata(): Promise { } const ChooseMessageOrderPage = async () => { - return ; + return ( + + + + ); }; export default ChooseMessageOrderPage; diff --git a/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/page.tsx index c49ee7ac2..c1bf09b4f 100644 --- a/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/page.tsx @@ -7,6 +7,7 @@ import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; import { ChooseChannelTemplate } from '@forms/ChooseChannelTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { getTemplates } from '@utils/form-actions'; import { $LockNumber } from 'nhs-notify-backend-client'; const { pageTitle, pageHeading, noTemplatesText } = @@ -53,13 +54,15 @@ export default async function ChooseNhsAppTemplate( }); return ( - + + + ); } diff --git a/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/preview-template/[templateId]/page.tsx b/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/preview-template/[templateId]/page.tsx index 87906a2e4..efc0a56b0 100644 --- a/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/preview-template/[templateId]/page.tsx +++ b/frontend/src/app/message-plans/choose-nhs-app-template/[routingConfigId]/preview-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import { PreviewTemplateFromMessagePlan } from '@molecules/PreviewTemplateFromMessagePlan/PreviewTemplateFromMessagePlan'; import PreviewTemplateDetailsNhsApp from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsNhsApp'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { $LockNumber } from 'nhs-notify-backend-client'; const { pageTitle } = content.components.previewNHSAppTemplate; @@ -44,12 +45,14 @@ const PreviewNhsAppTemplateFromMessagePlan = async ( } return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/page.tsx index edfdc1045..8e4d84ec8 100644 --- a/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/page.tsx @@ -7,6 +7,7 @@ import { redirect, RedirectType } from 'next/navigation'; import { ChooseLanguageLetterTemplates } from '@forms/ChooseLanguageLetterTemplates/ChooseLanguageLetterTemplates'; import { getForeignLanguageLetterTemplates } from '@utils/form-actions'; import { $LockNumber } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; import content from '@content/content'; const { pageTitle, pageHeading } = @@ -54,12 +55,14 @@ export default async function ChooseOtherLanguageLetterTemplate( } return ( - + + + ); } diff --git a/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx b/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx index 38ec95ac9..338f3aa0b 100644 --- a/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx +++ b/frontend/src/app/message-plans/choose-other-language-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx @@ -11,6 +11,7 @@ import content from '@content/content'; import { PreviewTemplateFromMessagePlan } from '@molecules/PreviewTemplateFromMessagePlan/PreviewTemplateFromMessagePlan'; import PreviewTemplateDetailsLetter from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsLetter'; import { $LockNumber } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.pages.previewOtherLanguageLetterTemplate; @@ -44,12 +45,14 @@ const PreviewOtherLanguageLetterTemplateFromMessagePlan = async ( } return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/page.tsx index c000e580b..cfc785430 100644 --- a/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/page.tsx @@ -7,6 +7,7 @@ import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; import { ChooseChannelTemplate } from '@forms/ChooseChannelTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { getTemplates } from '@utils/form-actions'; import { $LockNumber } from 'nhs-notify-backend-client'; const { pageTitle, pageHeading, noTemplatesText } = @@ -56,13 +57,15 @@ export default async function ChooseStandardEnglishLetterTemplate( }); return ( - + + + ); } diff --git a/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx b/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx index 579b6695b..67bb6b799 100644 --- a/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx +++ b/frontend/src/app/message-plans/choose-standard-english-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx @@ -11,6 +11,7 @@ import content from '@content/content'; import { PreviewTemplateFromMessagePlan } from '@molecules/PreviewTemplateFromMessagePlan/PreviewTemplateFromMessagePlan'; import PreviewTemplateDetailsLetter from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsLetter'; import { $LockNumber } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewLetterTemplate; @@ -44,12 +45,14 @@ const PreviewStandardEnglishLetterTemplateFromMessagePlan = async ( } return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/choose-templates/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-templates/[routingConfigId]/page.tsx index 95735dfb3..c35a44e5f 100644 --- a/frontend/src/app/message-plans/choose-templates/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-templates/[routingConfigId]/page.tsx @@ -21,6 +21,7 @@ import { } from '@atoms/nhsuk-components'; import { NHSNotifyFormErrorSummary } from '@atoms/NHSNotifyForm/ErrorSummary'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; +import { NHSNotifyContainer } from '@layouts/container/container'; import copy from '@content/content'; import { MessagePlanChooseTemplatesMoveToProductionForm } from '@forms/ChooseTemplates/MovetoProduction'; import { MessagePlanBlock } from '@molecules/MessagePlanBlock/MessagePlanBlock'; @@ -75,106 +76,183 @@ export default async function ChooseTemplatesPage(props: MessagePlanPageProps) { const templates = await getMessagePlanTemplates(messagePlan); return ( - -
    -
    - - - {content.headerCaption} -

    - {messagePlan.name} -

    -

    - - {content.changeNameLink.text} - -

    - - - - - {content.rowHeadings.routingPlanId} - - + +
    +
    + + + {content.headerCaption} +

    + {messagePlan.name} +

    +

    + - {messagePlan.id} - - - - - {content.rowHeadings.campaignId} - - - {messagePlan.campaignId} - - - - {content.rowHeadings.status} - - - {messagePlanStatusToDisplayText(messagePlan.status)} - - - - + {content.changeNameLink.text} + +

    - - {messagePlan.cascade.map((cascadeItem, index) => { - const defaultTemplate = getDefaultTemplateForItem( - cascadeItem, - templates - ); + + + + {content.rowHeadings.routingPlanId} + + + {messagePlan.id} + + + + + {content.rowHeadings.campaignId} + + + {messagePlan.campaignId} + + + + {content.rowHeadings.status} + + + {messagePlanStatusToDisplayText(messagePlan.status)} + + + + - const channelTemplateType = channelDisplayMappings( - cascadeItem.channel - ); + + {messagePlan.cascade.map((cascadeItem, index) => { + const defaultTemplate = getDefaultTemplateForItem( + cascadeItem, + templates + ); - const conditionalTemplates = getConditionalTemplatesForItem( - cascadeItem, - templates - ); + const channelTemplateType = channelDisplayMappings( + cascadeItem.channel + ); - const languageTemplates = getLanguageTemplatesForCascadeItem( - cascadeItem, - conditionalTemplates - ); + const conditionalTemplates = getConditionalTemplatesForItem( + cascadeItem, + templates + ); - return ( - - - + - - + + + + + {cascadeItem.channel === 'LETTER' ? ( + + + + + + {ROUTING_ACCESSIBLE_FORMAT_LETTER_TYPES.map( + (format) => { + const template = getTemplateForAccessibleFormat( + format, + cascadeItem, + conditionalTemplates + ); + const formatDisplay = + accessibleFormatDisplayMappings(format); - {cascadeItem.channel === 'LETTER' ? ( - + return ( + + + + + + ); + } + )} + + + + + + + + ) : null} + + + {/* Show fallback conditions only if there is more than one channel, and not for the last channel */} + {messagePlan.cascade.length > 1 && + index < messagePlan.cascade.length - 1 && ( @@ -183,91 +261,19 @@ export default async function ChooseTemplatesPage(props: MessagePlanPageProps) { index={index} /> + )} + + ); + })} + - {ROUTING_ACCESSIBLE_FORMAT_LETTER_TYPES.map( - (format) => { - const template = getTemplateForAccessibleFormat( - format, - cascadeItem, - conditionalTemplates - ); - const formatDisplay = - accessibleFormatDisplayMappings(format); - - return ( - - - - - - ); - } - )} - - - - - - - - ) : null} - - - {/* Show fallback conditions only if there is more than one channel, and not for the last channel */} - {messagePlan.cascade.length > 1 && - index < messagePlan.cascade.length - 1 && ( - - - - )} - - ); - })} - - - -
    + + +
    -
    - + + ); } diff --git a/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/page.tsx index abef53c5a..fe086c017 100644 --- a/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/page.tsx @@ -7,6 +7,7 @@ import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; import { ChooseChannelTemplate } from '@forms/ChooseChannelTemplate'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { getTemplates } from '@utils/form-actions'; import { $LockNumber } from 'nhs-notify-backend-client'; @@ -54,13 +55,15 @@ export default async function ChooseTextMessageTemplate( }); return ( - + + + ); } diff --git a/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/preview-template/[templateId]/page.tsx b/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/preview-template/[templateId]/page.tsx index 198364499..7a959868a 100644 --- a/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/preview-template/[templateId]/page.tsx +++ b/frontend/src/app/message-plans/choose-text-message-template/[routingConfigId]/preview-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import { PreviewTemplateFromMessagePlan } from '@molecules/PreviewTemplateFromMessagePlan/PreviewTemplateFromMessagePlan'; import PreviewTemplateDetailsSms from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsSms'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { $LockNumber } from 'nhs-notify-backend-client'; const { pageTitle } = content.components.previewSMSTemplate; @@ -44,12 +45,14 @@ const PreviewTextMessageTemplateFromMessagePlan = async ( } return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/create-message-plan/page.tsx b/frontend/src/app/message-plans/create-message-plan/page.tsx index bfb1aceea..1f98a1d79 100644 --- a/frontend/src/app/message-plans/create-message-plan/page.tsx +++ b/frontend/src/app/message-plans/create-message-plan/page.tsx @@ -6,6 +6,7 @@ import { NHSNotifyFormErrorSummary } from '@atoms/NHSNotifyForm/ErrorSummary'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import content from '@content/content'; import { MessagePlanForm } from '@forms/MessagePlan/MessagePlan'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { getCampaignIds } from '@utils/client-config'; import { fetchClient } from '@utils/server-features'; import { NHSNotifyFormProvider } from '@providers/form-provider'; @@ -47,26 +48,28 @@ export default async function CreateMessagePlanPage({ } return ( - - - -
    -
    -

    {pageContent.pageHeading}

    - - - + + + + +
    +
    +

    {pageContent.pageHeading}

    + + + +
    -
    - - + + + ); } diff --git a/frontend/src/app/message-plans/edit-message-plan-settings/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/edit-message-plan-settings/[routingConfigId]/page.tsx index ee15b6a54..a41ce5633 100644 --- a/frontend/src/app/message-plans/edit-message-plan-settings/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/edit-message-plan-settings/[routingConfigId]/page.tsx @@ -4,6 +4,7 @@ import type { MessagePlanPageProps } from 'nhs-notify-web-template-management-ut import { NHSNotifyFormErrorSummary } from '@atoms/NHSNotifyForm/ErrorSummary'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { MessagePlanForm } from '@forms/MessagePlan/MessagePlan'; import { getCampaignIds } from '@utils/client-config'; import { getRoutingConfig } from '@utils/message-plans'; @@ -38,33 +39,37 @@ export default async function EditMessagePlanSettingsPage({ } return ( - - - -
    -
    -

    {pageContent.pageHeading}

    - - - - + + + + +
    +
    +

    {pageContent.pageHeading}

    + + + + +
    -
    - - + + + ); } diff --git a/frontend/src/app/message-plans/get-ready-to-move/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/get-ready-to-move/[routingConfigId]/page.tsx index bea27ce1c..a9b12d896 100644 --- a/frontend/src/app/message-plans/get-ready-to-move/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/get-ready-to-move/[routingConfigId]/page.tsx @@ -4,6 +4,7 @@ import type { MessagePlanPageProps } from 'nhs-notify-web-template-management-ut import { NHSNotifyButton } from '@atoms/NHSNotifyButton/NHSNotifyButton'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { ContentRenderer } from '@molecules/ContentRenderer/ContentRenderer'; import { getRoutingConfig } from '@utils/message-plans'; @@ -25,49 +26,51 @@ export default async function MessagePlanGetReadyToMoveToProductionPage({ } return ( - -
    -
    - {pageContent.stepCounter} -

    {pageContent.heading}

    + + +
    +
    + {pageContent.stepCounter} +

    {pageContent.heading}

    -
    -
    -
    Name
    -
    - {routingConfig.name} -
    -
    -
    +
    +
    +
    Name
    +
    + {routingConfig.name} +
    +
    +
    - + -
    -

    - {pageContent.callout.label} - : -

    - -
    -
    - - {pageContent.continue.text} - +
    +

    + {pageContent.callout.label} + : +

    + +
    +
    + + {pageContent.continue.text} + - - {pageContent.cancel.text} - + + {pageContent.cancel.text} + +
    -
    -
    + +
    ); } diff --git a/frontend/src/app/message-plans/invalid/page.tsx b/frontend/src/app/message-plans/invalid/page.tsx index 1af01d67f..aa60bbded 100644 --- a/frontend/src/app/message-plans/invalid/page.tsx +++ b/frontend/src/app/message-plans/invalid/page.tsx @@ -1,7 +1,12 @@ 'use client'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { ErrorPage404 } from '@molecules/404/404'; -const InvalidMessagePlanPage = () => ; +const InvalidMessagePlanPage = () => ( + + + +); export default InvalidMessagePlanPage; diff --git a/frontend/src/app/message-plans/page.tsx b/frontend/src/app/message-plans/page.tsx index f13517560..6c577374e 100644 --- a/frontend/src/app/message-plans/page.tsx +++ b/frontend/src/app/message-plans/page.tsx @@ -1,6 +1,7 @@ 'use server'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { MessagePlans } from '@molecules/MessagePlans/MessagePlans'; import { Metadata } from 'next'; import { countRoutingConfigs, getRoutingConfigs } from '@utils/message-plans'; @@ -32,16 +33,18 @@ const MessagePlansPage = async () => { const completed = messagePlans.filter((r) => r.status === 'COMPLETED'); return ( - + + + ); }; diff --git a/frontend/src/app/message-plans/preview-message-plan/[routingConfigId]/page.tsx b/frontend/src/app/message-plans/preview-message-plan/[routingConfigId]/page.tsx index 068539b38..6ef652ef4 100644 --- a/frontend/src/app/message-plans/preview-message-plan/[routingConfigId]/page.tsx +++ b/frontend/src/app/message-plans/preview-message-plan/[routingConfigId]/page.tsx @@ -9,6 +9,7 @@ import { messagePlanStatusToTagColour, type MessagePlanPageProps, } from 'nhs-notify-web-template-management-utils'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import { NHSNotifyWarningCallout } from '@atoms/NHSNotifyWarningCallout/NHSNotifyWarningCallout'; import { DetailsSummary, DetailsText, Tag } from '@atoms/nhsuk-components'; @@ -75,7 +76,7 @@ export default async function PreviewMessagePlanPage({ const templates = await getMessagePlanTemplates(messagePlan); return ( - <> +
    - + ); } diff --git a/frontend/src/app/message-templates/page.tsx b/frontend/src/app/message-templates/page.tsx index 4646dec61..d865a9c64 100644 --- a/frontend/src/app/message-templates/page.tsx +++ b/frontend/src/app/message-templates/page.tsx @@ -1,6 +1,7 @@ import { NHSNotifyButton } from '@atoms/NHSNotifyButton/NHSNotifyButton'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { MessageTemplates } from '@molecules/MessageTemplates/MessageTemplates'; import { getTemplates } from '@utils/form-actions'; import { Metadata } from 'next'; @@ -24,30 +25,35 @@ export default async function MessageTemplatesPage() { const availableTemplateList = await getTemplates(); return ( - -
    -
    -

    - {messageTemplatesContent.pageHeading} -

    + + +
    +
    +

    + {messageTemplatesContent.pageHeading} +

    - - {messageTemplatesContent.createTemplateButton.text} - + + {messageTemplatesContent.createTemplateButton.text} + - {availableTemplateList && availableTemplateList.length > 0 ? ( - - ) : ( -

    - {messageTemplatesContent.emptyTemplates} -

    - )} + {availableTemplateList && availableTemplateList.length > 0 ? ( + + ) : ( +

    + {messageTemplatesContent.emptyTemplates} +

    + )} +
    -
    - + + ); } diff --git a/frontend/src/app/nhs-app-template-submitted/[templateId]/page.tsx b/frontend/src/app/nhs-app-template-submitted/[templateId]/page.tsx index 6c46bf0eb..214337277 100644 --- a/frontend/src/app/nhs-app-template-submitted/[templateId]/page.tsx +++ b/frontend/src/app/nhs-app-template-submitted/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.templateSubmitted; @@ -31,7 +32,11 @@ const NhsAppTemplateSubmittedPage = async (props: TemplatePageProps) => { const { id, name } = validatedTemplate; - return ; + return ( + + + + ); }; export default NhsAppTemplateSubmittedPage; diff --git a/frontend/src/app/preview-email-template/[templateId]/page.tsx b/frontend/src/app/preview-email-template/[templateId]/page.tsx index a0a383658..975ddcb11 100644 --- a/frontend/src/app/preview-email-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-email-template/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import { PreviewEmailTemplate } from '@forms/PreviewEmailTemplate'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewEmailTemplate; @@ -29,7 +30,11 @@ const PreviewEmailTemplatePage = async (props: TemplatePageProps) => { redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default PreviewEmailTemplatePage; diff --git a/frontend/src/app/preview-letter-template/[templateId]/page.tsx b/frontend/src/app/preview-letter-template/[templateId]/page.tsx index 1ba23d7c9..f08b351f8 100644 --- a/frontend/src/app/preview-letter-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-letter-template/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { redirect, RedirectType } from 'next/navigation'; import { PreviewLetterTemplate } from '@organisms/PreviewLetterTemplate/PreviewLetterTemplate'; import content from '@content/content'; import type { Metadata } from 'next'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewLetterTemplate; @@ -29,7 +30,11 @@ const PreviewLetterTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default PreviewLetterTemplatePage; diff --git a/frontend/src/app/preview-nhs-app-template/[templateId]/page.tsx b/frontend/src/app/preview-nhs-app-template/[templateId]/page.tsx index fbf21af6b..7687b2c4e 100644 --- a/frontend/src/app/preview-nhs-app-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-nhs-app-template/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewNHSAppTemplate; @@ -29,7 +30,11 @@ const PreviewNhsAppTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default PreviewNhsAppTemplatePage; diff --git a/frontend/src/app/preview-submitted-email-template/[templateId]/page.tsx b/frontend/src/app/preview-submitted-email-template/[templateId]/page.tsx index e183dc870..8def78b96 100644 --- a/frontend/src/app/preview-submitted-email-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-submitted-email-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsEmail from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsEmail'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewEmailTemplate; @@ -31,10 +32,12 @@ const PreviewSubmittedEmailTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/preview-submitted-letter-template/[templateId]/page.tsx b/frontend/src/app/preview-submitted-letter-template/[templateId]/page.tsx index a58c615b7..99bbd2969 100644 --- a/frontend/src/app/preview-submitted-letter-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-submitted-letter-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsLetter from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsLetter'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewLetterTemplate; @@ -31,10 +32,12 @@ const PreviewSubmittedLetterTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/preview-submitted-nhs-app-template/[templateId]/page.tsx b/frontend/src/app/preview-submitted-nhs-app-template/[templateId]/page.tsx index 03721e88a..5bd98b934 100644 --- a/frontend/src/app/preview-submitted-nhs-app-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-submitted-nhs-app-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsNhsApp from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsNhsApp'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewNHSAppTemplate; @@ -31,10 +32,12 @@ const PreviewSubmittedNHSAppTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/preview-submitted-text-message-template/[templateId]/page.tsx b/frontend/src/app/preview-submitted-text-message-template/[templateId]/page.tsx index 838ddce38..947f88ff9 100644 --- a/frontend/src/app/preview-submitted-text-message-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-submitted-text-message-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { Metadata } from 'next'; import content from '@content/content'; import { PreviewSubmittedTemplate } from '@molecules/PreviewSubmittedTemplate/PreviewSubmittedTemplate'; import PreviewTemplateDetailsSms from '@molecules/PreviewTemplateDetails/PreviewTemplateDetailsSms'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewSMSTemplate; @@ -31,10 +32,12 @@ const PreviewSubmittedSMSTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/preview-text-message-template/[templateId]/page.tsx b/frontend/src/app/preview-text-message-template/[templateId]/page.tsx index 8fec64727..218cf72c2 100644 --- a/frontend/src/app/preview-text-message-template/[templateId]/page.tsx +++ b/frontend/src/app/preview-text-message-template/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import { PreviewSMSTemplate } from '@forms/PreviewSMSTemplate'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.previewSMSTemplate; @@ -29,7 +30,11 @@ const PreviewSMSTemplatePage = async (props: TemplatePageProps) => { return redirect('/invalid-template', RedirectType.replace); } - return ; + return ( + + + + ); }; export default PreviewSMSTemplatePage; diff --git a/frontend/src/app/request-proof-of-template/[templateId]/page.tsx b/frontend/src/app/request-proof-of-template/[templateId]/page.tsx index b542a5aa8..5c1190c60 100644 --- a/frontend/src/app/request-proof-of-template/[templateId]/page.tsx +++ b/frontend/src/app/request-proof-of-template/[templateId]/page.tsx @@ -11,6 +11,7 @@ import { getTemplate } from '@utils/form-actions'; import content from '@content/content'; import { serverIsFeatureEnabled } from '@utils/server-features'; import { $LockNumber } from 'nhs-notify-backend-client'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.requestProof; @@ -53,12 +54,14 @@ const RequestProofPage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/submit-email-template/[templateId]/page.tsx b/frontend/src/app/submit-email-template/[templateId]/page.tsx index ab1412967..792aae06f 100644 --- a/frontend/src/app/submit-email-template/[templateId]/page.tsx +++ b/frontend/src/app/submit-email-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { } from 'nhs-notify-web-template-management-utils'; import { getTemplate } from '@utils/form-actions'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.submitTemplate; @@ -42,12 +43,14 @@ const SubmitEmailTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/submit-letter-template/[templateId]/page.tsx b/frontend/src/app/submit-letter-template/[templateId]/page.tsx index 4aac6e074..aa37db530 100644 --- a/frontend/src/app/submit-letter-template/[templateId]/page.tsx +++ b/frontend/src/app/submit-letter-template/[templateId]/page.tsx @@ -11,6 +11,7 @@ import { SubmitLetterTemplate } from '@forms/SubmitTemplate/SubmitLetterTemplate import { $LockNumber } from 'nhs-notify-backend-client'; import { serverIsFeatureEnabled } from '@utils/server-features'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; export async function generateMetadata(): Promise { const routingEnabled = await serverIsFeatureEnabled('routing'); @@ -47,11 +48,13 @@ const SubmitLetterTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/submit-nhs-app-template/[templateId]/page.tsx b/frontend/src/app/submit-nhs-app-template/[templateId]/page.tsx index c81ce5fe7..1f4993242 100644 --- a/frontend/src/app/submit-nhs-app-template/[templateId]/page.tsx +++ b/frontend/src/app/submit-nhs-app-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { } from 'nhs-notify-web-template-management-utils'; import { getTemplate } from '@utils/form-actions'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.submitTemplate; @@ -42,12 +43,14 @@ const SubmitNhsAppTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/submit-text-message-template/[templateId]/page.tsx b/frontend/src/app/submit-text-message-template/[templateId]/page.tsx index d6e43573f..3f4bc650a 100644 --- a/frontend/src/app/submit-text-message-template/[templateId]/page.tsx +++ b/frontend/src/app/submit-text-message-template/[templateId]/page.tsx @@ -10,6 +10,7 @@ import { } from 'nhs-notify-web-template-management-utils'; import { getTemplate } from '@utils/form-actions'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.submitTemplate; @@ -42,12 +43,14 @@ const SubmitSmsTemplatePage = async (props: TemplatePageProps) => { } return ( - + + + ); }; diff --git a/frontend/src/app/text-message-template-submitted/[templateId]/page.tsx b/frontend/src/app/text-message-template-submitted/[templateId]/page.tsx index 84336524a..00a034127 100644 --- a/frontend/src/app/text-message-template-submitted/[templateId]/page.tsx +++ b/frontend/src/app/text-message-template-submitted/[templateId]/page.tsx @@ -9,6 +9,7 @@ import { import { getTemplate } from '@utils/form-actions'; import { redirect, RedirectType } from 'next/navigation'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; const { pageTitle } = content.components.templateSubmitted; @@ -31,7 +32,11 @@ const SmsTemplateSubmittedPage = async (props: TemplatePageProps) => { const { id, name } = validatedTemplate; - return ; + return ( + + + + ); }; export default SmsTemplateSubmittedPage; diff --git a/frontend/src/app/upload-british-sign-language-letter-template/page.tsx b/frontend/src/app/upload-british-sign-language-letter-template/page.tsx index 8d09bce51..49a6f3a3f 100644 --- a/frontend/src/app/upload-british-sign-language-letter-template/page.tsx +++ b/frontend/src/app/upload-british-sign-language-letter-template/page.tsx @@ -6,6 +6,7 @@ import * as NHSNotifyForm from '@atoms/NHSNotifyForm'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import copy from '@content/content'; import * as UploadDocxLetterTemplateForm from '@forms/UploadDocxLetterTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { ContentRenderer } from '@molecules/ContentRenderer/ContentRenderer'; import { NHSNotifyFormProvider } from '@providers/form-provider'; import { fetchClient } from '@utils/server-features'; @@ -35,7 +36,7 @@ export default async function UploadLargePrintLetterTemplatePage() { } return ( - <> + {content.backLink.text} @@ -67,6 +68,6 @@ export default async function UploadLargePrintLetterTemplatePage() {
    - + ); } diff --git a/frontend/src/app/upload-large-print-letter-template/page.tsx b/frontend/src/app/upload-large-print-letter-template/page.tsx index 6dff3c65a..0fe6fb422 100644 --- a/frontend/src/app/upload-large-print-letter-template/page.tsx +++ b/frontend/src/app/upload-large-print-letter-template/page.tsx @@ -6,6 +6,7 @@ import * as NHSNotifyForm from '@atoms/NHSNotifyForm'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import copy from '@content/content'; import * as UploadDocxLetterTemplateForm from '@forms/UploadDocxLetterTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { ContentRenderer } from '@molecules/ContentRenderer/ContentRenderer'; import { NHSNotifyFormProvider } from '@providers/form-provider'; import { fetchClient } from '@utils/server-features'; @@ -35,7 +36,7 @@ export default async function UploadLargePrintLetterTemplatePage() { } return ( - <> + {content.backLink.text} @@ -67,6 +68,6 @@ export default async function UploadLargePrintLetterTemplatePage() {
    - + ); } diff --git a/frontend/src/app/upload-letter-template/client-id-and-campaign-id-required/page.tsx b/frontend/src/app/upload-letter-template/client-id-and-campaign-id-required/page.tsx index 5eff81018..779e6178c 100644 --- a/frontend/src/app/upload-letter-template/client-id-and-campaign-id-required/page.tsx +++ b/frontend/src/app/upload-letter-template/client-id-and-campaign-id-required/page.tsx @@ -1,5 +1,6 @@ import InvalidConfig from '@molecules/InvalidConfig/InvalidConfig'; import content from '@content/content'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { Metadata } from 'next'; const pageContent = content.pages.letterTemplateInvalidConfiguration; @@ -9,5 +10,9 @@ export const metadata: Metadata = { }; export default function ClientIdAndCampaignIdRequiredPage() { - return ; + return ( + + + + ); } diff --git a/frontend/src/app/upload-letter-template/page.tsx b/frontend/src/app/upload-letter-template/page.tsx index 580b9a231..5b2994b42 100644 --- a/frontend/src/app/upload-letter-template/page.tsx +++ b/frontend/src/app/upload-letter-template/page.tsx @@ -3,6 +3,7 @@ import { redirect, RedirectType } from 'next/navigation'; import { UploadLetterTemplate } from 'nhs-notify-web-template-management-utils'; import content from '@content/content'; import { LetterTemplateForm } from '@forms/LetterTemplateForm/LetterTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { fetchClient } from '@utils/server-features'; import { getCampaignIds } from '@utils/client-config'; @@ -36,7 +37,12 @@ const UploadLetterTemplatePage = async () => { }; return ( - + + + ); }; diff --git a/frontend/src/app/upload-other-language-letter-template/page.tsx b/frontend/src/app/upload-other-language-letter-template/page.tsx index f376d9293..f9c137417 100644 --- a/frontend/src/app/upload-other-language-letter-template/page.tsx +++ b/frontend/src/app/upload-other-language-letter-template/page.tsx @@ -6,6 +6,7 @@ import * as NHSNotifyForm from '@atoms/NHSNotifyForm'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import copy from '@content/content'; import * as UploadDocxLetterTemplateForm from '@forms/UploadDocxLetterTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { ContentRenderer } from '@molecules/ContentRenderer/ContentRenderer'; import { NHSNotifyFormProvider } from '@providers/form-provider'; import { fetchClient } from '@utils/server-features'; @@ -35,7 +36,7 @@ export default async function UploadOtherLanguageLetterTemplatePage() { } return ( - <> + {content.backLink.text} @@ -68,6 +69,6 @@ export default async function UploadOtherLanguageLetterTemplatePage() {
    - + ); } diff --git a/frontend/src/app/upload-standard-english-letter-template/page.tsx b/frontend/src/app/upload-standard-english-letter-template/page.tsx index 0f2bc5228..086e1d615 100644 --- a/frontend/src/app/upload-standard-english-letter-template/page.tsx +++ b/frontend/src/app/upload-standard-english-letter-template/page.tsx @@ -6,6 +6,7 @@ import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; import * as NHSNotifyForm from '@atoms/NHSNotifyForm'; import copy from '@content/content'; import * as UploadDocxLetterTemplateForm from '@forms/UploadDocxLetterTemplateForm'; +import { NHSNotifyContainer } from '@layouts/container/container'; import { ContentRenderer } from '@molecules/ContentRenderer/ContentRenderer'; import { NHSNotifyFormProvider } from '@providers/form-provider'; import { fetchClient } from '@utils/server-features'; @@ -35,7 +36,7 @@ export default async function UploadStandardLetterTemplatePage() { } return ( - <> + {content.backLink.text} @@ -67,6 +68,6 @@ export default async function UploadStandardLetterTemplatePage() {
    - + ); } diff --git a/frontend/src/components/layouts/container/container.tsx b/frontend/src/components/layouts/container/container.tsx index b184bf2a8..da8fa60a1 100644 --- a/frontend/src/components/layouts/container/container.tsx +++ b/frontend/src/components/layouts/container/container.tsx @@ -1,7 +1,13 @@ export function NHSNotifyContainer({ children, + fullWidth = false, }: { children: React.ReactNode; + fullWidth?: boolean; }) { - return
    {children}
    ; + const className = fullWidth + ? 'nhsuk-width-container-fluid' + : 'nhsuk-width-container'; + + return
    {children}
    ; } From a1ecdcbd202b36c371a2135e234c81eb12ab40ed Mon Sep 17 00:00:00 2001 From: "alex.nuttall1" Date: Tue, 10 Feb 2026 13:06:01 +0000 Subject: [PATCH 2/4] axios update --- lambdas/backend-client/package.json | 2 +- package-lock.json | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lambdas/backend-client/package.json b/lambdas/backend-client/package.json index 3c7ff95b9..52061bc9d 100644 --- a/lambdas/backend-client/package.json +++ b/lambdas/backend-client/package.json @@ -1,7 +1,7 @@ { "dependencies": { "@hey-api/openapi-ts": "^0.90.4", - "axios": "^1.8.4", + "axios": "^1.13.5", "axios-retry": "^4.5.0", "zod": "^4.0.17" }, diff --git a/package-lock.json b/package-lock.json index b426ccbc7..ac576bb23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -464,7 +464,7 @@ "version": "0.0.1", "dependencies": { "@hey-api/openapi-ts": "^0.90.4", - "axios": "^1.8.4", + "axios": "^1.13.5", "axios-retry": "^4.5.0", "zod": "^4.0.17" }, @@ -479,6 +479,17 @@ "typescript": "^5.9.3" } }, + "lambdas/backend-client/node_modules/axios": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^1.1.0" + } + }, "lambdas/cognito-triggers": { "version": "0.0.1", "devDependencies": { From 73a462b6cda21b513d7530f06491a78e23ce2aae Mon Sep 17 00:00:00 2001 From: "alex.nuttall1" Date: Tue, 10 Feb 2026 13:23:19 +0000 Subject: [PATCH 3/4] npm update axios --- package-lock.json | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index ac576bb23..0e9537876 100644 --- a/package-lock.json +++ b/package-lock.json @@ -479,17 +479,6 @@ "typescript": "^5.9.3" } }, - "lambdas/backend-client/node_modules/axios": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", - "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.11", - "form-data": "^4.0.5", - "proxy-from-env": "^1.1.0" - } - }, "lambdas/cognito-triggers": { "version": "0.0.1", "devDependencies": { @@ -13228,13 +13217,13 @@ } }, "node_modules/axios": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.4.tgz", - "integrity": "sha512-1wVkUaAO6WyaYtCkcYCOx12ZgpGf9Zif+qXa4n+oYzK558YryKqiL6UWwd5DqiH3VRW0GYhTZQ/vlgJrCoNQlg==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, From a3441acf4688a1d0f5aa7511e1e6e82e0aec6096 Mon Sep 17 00:00:00 2001 From: "alex.nuttall1" Date: Wed, 11 Feb 2026 07:31:17 +0000 Subject: [PATCH 4/4] add missing dev pages --- frontend/src/app/auth/idle/page.dev.tsx | 29 +++++++++++--------- frontend/src/app/auth/page.dev.tsx | 35 ++++++++++++++----------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/frontend/src/app/auth/idle/page.dev.tsx b/frontend/src/app/auth/idle/page.dev.tsx index 32b97daa5..d2dd465b9 100644 --- a/frontend/src/app/auth/idle/page.dev.tsx +++ b/frontend/src/app/auth/idle/page.dev.tsx @@ -6,6 +6,7 @@ import { useSearchParams } from 'next/navigation'; import { getBasePath } from '@utils/get-base-path'; import { formatTime } from '@molecules/LogoutWarningModal/format-time'; import { SignOut } from '../signout/page.dev'; +import { NHSNotifyContainer } from '@layouts/container/container'; const timeTillLogout = Number(process.env.NEXT_PUBLIC_TIME_TILL_LOGOUT_SECONDS) || 900; @@ -25,19 +26,21 @@ const SignInButton = () => { export default function Idle() { return ( - -
    -
    -

    You've been signed out

    -

    - You've been signed out because you've not used this - service for {formatTime(timeTillLogout)}. -

    -

    Any unsaved changes have been lost.

    -

    Sign in again to create and submit a template to NHS Notify.

    - + + +
    +
    +

    You've been signed out

    +

    + You've been signed out because you've not used this + service for {formatTime(timeTillLogout)}. +

    +

    Any unsaved changes have been lost.

    +

    Sign in again to create and submit a template to NHS Notify.

    + +
    -
    - + + ); } diff --git a/frontend/src/app/auth/page.dev.tsx b/frontend/src/app/auth/page.dev.tsx index 4135033e2..ce791f908 100644 --- a/frontend/src/app/auth/page.dev.tsx +++ b/frontend/src/app/auth/page.dev.tsx @@ -8,6 +8,7 @@ import '@aws-amplify/ui-react/styles.css'; // eslint-disable-next-line unicorn/prefer-node-protocol import path from 'path'; import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain'; +import { NHSNotifyContainer } from '@layouts/container/container'; const useRedirectPath = () => { const searchParams = useSearchParams(); @@ -29,22 +30,24 @@ const SignIn = () => { export default function Page() { return ( - - Loading...

    }> - + + Loading...

    }> + - - -
    -
    + }} + > + +
    +
    +
    + ); }