Skip to content

Commit b380f87

Browse files
committed
CCM-11966: Change button text and TemplateStatus on frontend
1 parent 44a4b09 commit b380f87

File tree

6 files changed

+199
-186
lines changed

6 files changed

+199
-186
lines changed

frontend/src/components/forms/SubmitTemplate/SubmitLetterTemplate.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,18 @@ export const SubmitLetterTemplate: FC<{
144144
readOnly
145145
/>
146146
<NHSNotifyButton
147-
secondary
148-
id='go-back-button'
147+
id='submit-template-button'
149148
className='nhsuk-u-margin-right-3'
149+
>
150+
{buttonText}
151+
</NHSNotifyButton>
152+
<NHSNotifyButton
153+
className='nhsuk-button-background-button'
154+
id='go-back-button'
150155
href={`${getBasePath()}/${goBackPath}/${templateId}`}
151156
>
152157
{goBackButtonText}
153158
</NHSNotifyButton>
154-
<NHSNotifyButton id='submit-template-button'>
155-
{buttonText}
156-
</NHSNotifyButton>
157159
</NHSNotifyFormWrapper>
158160
</div>
159161
</div>

frontend/src/content/content.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,21 +666,21 @@ const submitLetterTemplate = {
666666
warningCalloutLabel: 'Important',
667667
warningCalloutText: `You cannot edit a template after you've submitted it. You can only replace it with a new template.`,
668668
},
669-
pageHeading: 'Approve and submit',
669+
pageHeading: 'Approve',
670670
leadParagraph:
671-
'When you submit a letter template, it will be used by NHS Notify to set up the messages you want to send.',
672-
submitChecklistHeading: 'Before you submit this template',
671+
'When you approve your template proof, your template will be ready to add to a message plan.',
672+
submitChecklistHeading: 'Before you approve this template proof',
673673
submitChecklistIntroduction: 'Check that your template proof:',
674674
submitChecklistItems: [
675675
'looks exactly as you expect your recipient to get it',
676676
'uses personalisation as you expect',
677677
'shows QR codes correctly (if used)',
678678
],
679679
warningCalloutLabel: 'Important',
680-
warningCalloutText: `You cannot edit a template after you've approved and submitted it. You can only replace it with a new template.`,
680+
warningCalloutText: `You cannot edit a template after you've approved the template proof. You can only create a new template to replace it.`,
681681
goBackPath: 'preview-letter-template',
682682
goBackButtonText: submitTemplate.goBackButtonText,
683-
buttonText: 'Approve and submit',
683+
buttonText: 'Approve template proof',
684684
};
685685

686686
const copyTemplate = {

frontend/src/styles/app.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,11 @@ pre {
4444
.inline-block {
4545
display: inline-block;
4646
}
47+
48+
.nhsuk-button-background-button {
49+
background-color: nhsuk.$nhsuk-input-border-colour;
50+
}
51+
52+
.nhsuk-button-background-button:hover {
53+
background-color: nhsuk.$nhsuk-text-colour;
54+
}

lambdas/backend-client/src/schemas/union-lists.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const TEMPLATE_STATUS_LIST = arrayOfAll<TemplateStatus>()([
5050
'VALIDATION_FAILED',
5151
'VIRUS_SCAN_FAILED',
5252
'WAITING_FOR_PROOF',
53+
'TEMPLATE_PROOF_APPROVED',
5354
]);
5455

5556
export const LANGUAGE_LIST = arrayOfAll<Language>()([

lambdas/backend-client/src/types/generated/types.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ export type TemplateStatus =
228228
| 'VALIDATION_FAILED'
229229
| 'VIRUS_SCAN_FAILED'
230230
| 'WAITING_FOR_PROOF'
231-
| 'PROOF_AVAILABLE';
231+
| 'PROOF_AVAILABLE'
232+
| 'TEMPLATE_PROOF_APPROVED';
232233

233234
export type TemplateSuccess = {
234235
data: TemplateDto;

0 commit comments

Comments
 (0)