diff --git a/src/main/assets/scss/main.scss b/src/main/assets/scss/main.scss index 6547e4d10b..ebd88c75bf 100644 --- a/src/main/assets/scss/main.scss +++ b/src/main/assets/scss/main.scss @@ -13,6 +13,7 @@ @import './webchat'; @import './review-pages'; @import './timeout-modal'; +@import './progress-bar'; .hmcts-button-link, .uppy-FileInput-btn { @@ -44,3 +45,12 @@ section { .red-text { color: govuk-colour('red'); } + +.govuk-panel--confirmation { + background-color: #00703C; } + +.govuk-panel--outstanding { + background-color: #F3F2F1; + text-align: left; + padding: 20px; +} diff --git a/src/main/assets/scss/progress-bar.scss b/src/main/assets/scss/progress-bar.scss new file mode 100644 index 0000000000..fa6a6da2e9 --- /dev/null +++ b/src/main/assets/scss/progress-bar.scss @@ -0,0 +1,150 @@ +.hmcts-progress-bar-vertical { + margin: 40px 0; +} + +.hmcts-progress-bar__icon { + position: relative; + background-color: govuk-colour('white'); + border: 4px solid govuk-colour('mid-grey'); + border-radius: 50%; + box-sizing: border-box; + display: block; + height: 44px; + margin: 0 auto; + width: 44px; + + &--complete { + background-color: govuk-colour('blue'); + border: 4px solid govuk-colour('blue'); + background-image: url('/hmcts-assets/images/icon-progress-tick.svg'); + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: 23px; + + @include govuk-if-ie8 { + background-image: url(#{$hmcts-images-path}icon-progress-tick.png); + } + } + + &--active { + background-color: govuk-colour('blue'); + border: 4px solid govuk-colour('blue'); + font-weight: 700; + } +} + +.hmcts-progress-bar__label { + @include govuk-font(16); + word-wrap: normal; + display: block; + font-weight: inherit; + margin-top: 10px; + position: relative; +} + +.hmcts-progress-bar__list { + font-size: 0; + list-style: none; + margin: 0; + padding: 0; + position: relative; + text-align: justify; + vertical-align: top; + + @include govuk-if-ie8 { + display: table; + table-layout: fixed; + width: 100%; + } + + &::after { + content: ""; + display: inline-block; + width: 100%; + } + + &::before { + border-top: 4px solid govuk-colour('mid-grey'); + content: ""; + left: 30px; + position: absolute; + top: 20px; + bottom: 0; + width: 90%; + } +} + +.hmcts-progress-bar__list-item { + @include govuk-font(19); + display: inline-block; + max-width: 20%; + position: relative; + text-align: center; + vertical-align: top; + width:100px; + + // IE8 does not support the text justify approach for spacing + @include govuk-if-ie8 { + display: table-cell; + } + + &:first-child, &:last-child { + &::before { + border-top: 6px solid govuk-colour("white"); + content: ""; + position: absolute; + top: 13px; left: 0; + width: 50%; + } + } + + &:first-child::before { + left: 0; + } + + &:last-child::before { + left: auto; + right: 0; + } +} + +@media screen and (max-width: map-get($govuk-breakpoints, desktop)) { + .hmcts-progress-bar-vertical { + margin: 21px 0; + + .hmcts-progress-bar { + &__list-item { + max-width:45px; display:block; margin-top: 10px; + margin-top: 19px; + } + + &__icon { + height: 37px; + width: 37px; + + &--complete { + background-size: 19px; + } + } + + &__list::before { + border-top:none; + position:absolute; + top: 0px; + border-left: 6px solid govuk-colour('mid-grey'); + height: 100%; + position:absolute; + left:20px; + top:0; + } + + &__label { + margin-top:-29px; + margin-left:50px; + width:350px; + text-align:left; + font-size: 1.1rem; + } + } + } +} diff --git a/src/main/modules/state-redirect/index.ts b/src/main/modules/state-redirect/index.ts index fc37e8a55d..88f371aea9 100644 --- a/src/main/modules/state-redirect/index.ts +++ b/src/main/modules/state-redirect/index.ts @@ -10,6 +10,7 @@ import { APPLICANT_2, APPLICATION_SUBMITTED, APP_REPRESENTED, + HUB_PAGE, JOINT_APPLICATION_SUBMITTED, NO_RESPONSE_YET, PAYMENT_CALLBACK_URL, @@ -106,15 +107,19 @@ export class StateRedirectMiddleware { private getApplicationSubmittedRedirectPath(req: AppRequest): string | null { const userCase = req.session.userCase; - if (userCase?.applicationType === ApplicationType.SOLE_APPLICATION && req.path !== APPLICATION_SUBMITTED) { - return APPLICATION_SUBMITTED; + if ( + userCase?.applicationType === ApplicationType.SOLE_APPLICATION && + req.path !== APPLICATION_SUBMITTED && + req.path !== HUB_PAGE + ) { + return HUB_PAGE; } if ( userCase?.applicationType === ApplicationType.JOINT_APPLICATION && - ![JOINT_APPLICATION_SUBMITTED, APPLICANT_2 + JOINT_APPLICATION_SUBMITTED].includes(req.path) + ![JOINT_APPLICATION_SUBMITTED, HUB_PAGE, APPLICANT_2 + HUB_PAGE].includes(req.path) ) { - return req.session.isApplicant2 ? APPLICANT_2 + JOINT_APPLICATION_SUBMITTED : JOINT_APPLICATION_SUBMITTED; + return req.session.isApplicant2 ? APPLICANT_2 + HUB_PAGE : HUB_PAGE; } return null; diff --git a/src/main/steps/applicant1/app-represented/content.ts b/src/main/steps/applicant1/app-represented/content.ts index fafa5106f6..51f050d8a0 100644 --- a/src/main/steps/applicant1/app-represented/content.ts +++ b/src/main/steps/applicant1/app-represented/content.ts @@ -85,7 +85,7 @@ const cy: typeof en = ( link: config.get('govukUrls.domesticAbuse'), }, feedback: "Helpwch ni i wella'r gwasanaeth hwn", - feedbackLine1: 'Complete this short, 5-minute survey to help improve our services for you and others.', + feedbackLine1: 'Cwblhewch yr arolwg 5 munud hwn i helpu i wella ein gwasanaethau i chi ac eraill.', feedbackLine2: { part1: 'Mae hwn yn wasanaeth newydd.', link: feedbackLink, diff --git a/src/main/steps/applicant1/app-represented/progress-bar.njk b/src/main/steps/applicant1/app-represented/progress-bar.njk deleted file mode 100644 index b5a44fc3c5..0000000000 --- a/src/main/steps/applicant1/app-represented/progress-bar.njk +++ /dev/null @@ -1,74 +0,0 @@ -{% macro textWithVisuallyHiddenSpan(text, isComplete) %} - {{text}} {{'' if isComplete else 'not '}}completed -{% endmacro %} - -{% if isJointApplication %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAtOrAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.state() == 'FinalOrderComplete') - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% else %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(response, displayState.isAfter('IssuedToBailiff')) - }, - complete: displayState.isAfter('IssuedToBailiff'), - active: displayState.isAtOrAfter('AwaitingAos') and displayState.isBefore('Holding'), - interval: weeksToResponse - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.isAtOrAfter('FinalOrderPending')) - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% endif %} - -
-
-
    - {% for item in items %} -
  1. - - {{ item.label.html | safe if item.label.html else item.label.text }} - {% if item.interval %} - - {{ item.interval }} - - {% endif %} -
  2. - {% endfor %} -
-
-
diff --git a/src/main/steps/applicant1/app-represented/template.njk b/src/main/steps/applicant1/app-represented/template.njk index a7792e220e..346fdfbcb9 100644 --- a/src/main/steps/applicant1/app-represented/template.njk +++ b/src/main/steps/applicant1/app-represented/template.njk @@ -1,5 +1,4 @@ {% from "govuk/components/details/macro.njk" import govukDetails %} -{% from "components/hmcts-progress-bar/macro.njk" import hmctsProgressBar %} {% from "common/macros/service-address.njk" import serviceAddressMacro %} {% extends "common/page.njk" %} @@ -18,7 +17,8 @@

{{ appRepresentedText }}

- {% include "./progress-bar.njk" %} + {% include "../../common/progress-bar.njk" %} +

{{ subHeading6 }}

{{ line16.part1 }}{{ line16.linkText }}

{{ webChat }}

diff --git a/src/main/steps/applicant1/application-submitted/content.ts b/src/main/steps/applicant1/application-submitted/content.ts index 3b2be7dfb9..e7949527db 100644 --- a/src/main/steps/applicant1/application-submitted/content.ts +++ b/src/main/steps/applicant1/application-submitted/content.ts @@ -9,6 +9,7 @@ import { isCountryUk } from '../../applicant1Sequence'; import type { CommonContent } from '../../common/common.content'; import { formattedCaseId } from '../../common/content.utils'; import { currentStateFn } from '../../state-sequence'; +import { HUB_PAGE } from '../../urls'; import { getProgressBarContent } from '../hub-page/progressBarLabels'; const en = ( @@ -24,11 +25,12 @@ const en = ( }: CommonContent, feedbackLink: string ) => ({ - title: 'Application submitted', - yourReferenceNumber: 'Your reference number is:', - confirmationEmail: `You${isJointApplication ? ' and your ' + partner : ''} have been sent a confirmation${ - userCase.applicant1HelpWithFeesRefNo ? '' : ' and payment receipt' - } by email.`, + title: `Application ${ + userCase.applicant1CannotUpload || userCase.applicant2CannotUpload || userCase.iWantToHavePapersServedAnotherWay + ? 'saved' + : 'submitted' + }`, + yourReferenceNumber: 'Your reference number', subHeading1: 'What you need to do now', line1: 'Your application will not be processed until you have done the following:', subHeading2: 'Send your documents to the court', @@ -44,13 +46,12 @@ const en = ( [DocumentType.NAME_CHANGE_EVIDENCE]: 'Proof that you changed your name. For example, deed poll or statutory declaration.', }, - documentsByEmail: 'Sending documents by email', - documentsByEmailSteps: { - step1: 'Take a photo or scan of the document', - step2: 'Check the image shows the whole document and all the text is readable', - step3: 'Attach it to an email', - step4: `Include your reference number in the subject line: ${referenceNumber}`, - step5: 'Email the documents to:', + documentsByOnlineForm: 'Sending documents using our online form', + documentsByOnlineFormSteps: { + line1: 'You can send photographs or scans of your documents to us by', + line2: 'uploading them using our online form.', + line3: + 'Make sure you follow the instructions on how to upload your documents carefully or they could be rejected, resulting in further delays.', }, documentsByPost: 'Sending your documents by post', documentsByPostSteps: { @@ -58,7 +59,7 @@ const en = ( step2: 'Post the original documents to:', }, documentsByPostMoreDetails: - 'You must post the original documents or certified copies. Your marriage certificate will be returned to you, if you are posting it in. Other documents will not be returned.', + 'Make sure you also include in your response a return address. Any cherished documents you send, such as marriage certificates, birth certificates, passports or deed polls will be returned to you. Other documents will not be returned.', subHeading3: `Apply to serve the ${isDivorce ? 'divorce' : 'civil partnership'} papers another way`, line3: { p1: `You need to apply to serve the ${ @@ -82,14 +83,14 @@ const en = ( line6: `Your ${partner} will then be sent a copy of the application. They will be asked to check the information and respond. If they do not respond then you will be told what you can do next to progress the application.`, line7: `Your ${partner}’s solicitor will be contacted by the court, and asked to confirm they are representing them. They will be sent a copy of the application and asked to respond.`, line8: `If you want to ‘serve’ (send) the documents to your ${partner} yourself then phone ${telephoneNumber} to request it. Otherwise the court will do it.`, - line9: `If you want the court to serve (send) the application to be served by post instead of by email, then phone ${telephoneNumber}.`, + line9: `If you want the court to serve (send) the application by post instead of by email, then phone ${telephoneNumber}.`, line10: `The address you have provided for your ${partner} is outside of England and Wales. That means you are responsible for ‘serving’ (sending) the court documents, which notify your ${partner} about ${ isDivorce ? 'the divorce' : 'ending the civil partnership' }.`, line11: `You will receive the documents that you need to send to your ${partner} by email and letter, after the application has been checked.`, subHeading5: 'Dividing your money and property', line12: { - part1: `It’s usually more straightforward and less expensive if you agree with your ${partner} on how to divide your money and property.`, + part1: `It’s usually easier and less expensive if you agree with your ${partner} on how to divide your money and property.`, part2: 'Get help agreeing.', link: config.get('govukUrls.mediation'), }, @@ -112,10 +113,14 @@ const en = ( subHeading6: 'If you need help', line16: { part1: - 'Court staff can give you help with your application. They cannot give you legal advice. You should speak to a ', - linkText: 'solicitor or legal adviser', + 'Court staff can give you help with your application. They cannot give you legal advice. If you need legal advice, you should speak to a ', + linkText: 'solicitor or legal advisor', link: config.get('govukUrls.legalAdvisor'), }, + subHeading7: 'Visit your application hub', + line17: { + part1: `You can view the progress of your application in the application hub.`, + }, webChat, sendUsAMessage: 'Send us a message', telephone: 'Telephone', @@ -133,9 +138,10 @@ const en = ( feedback: "We'd like to hear your thoughts", feedbackLine1: 'Complete this short, 5-minute survey to help improve our services for you and others.', feedbackLine2: { - part1: 'Please leave your feedback here', + part1: 'Leave your feedback', link: feedbackLink, }, + useOurOnlineForm: 'Use our online form', }); // @TODO Welsh @@ -152,11 +158,12 @@ const cy: typeof en = ( }: CommonContent, feedbackLink: string ) => ({ - title: 'Cyflwynwyd y cais', - yourReferenceNumber: 'Eich cyfeirnod yw:', - confirmationEmail: `Mae cadarnhad${ - userCase.applicant1HelpWithFeesRefNo ? '' : ' a derbynneb am y taliad' - } wedi’i anfon atoch chi${isJointApplication ? ' a’ch ' + partner : ''} drwy e-bost.`, + title: `${ + userCase.applicant1CannotUpload || userCase.applicant2CannotUpload || userCase.iWantToHavePapersServedAnotherWay + ? 'Cais wedi’i gadw' + : 'Cyflwynwyd y cais' + }`, + yourReferenceNumber: 'Eich cyfeirnod yw', subHeading1: 'Beth sydd angen i chi ei wneud nawr', line1: 'Ni fydd eich cais yn cael ei brosesu hyd nes y byddwch wedi gwneud y canlynol:', subHeading2: 'Anfon eich dogfennau i’r llys', @@ -172,13 +179,12 @@ const cy: typeof en = ( [DocumentType.NAME_CHANGE_EVIDENCE]: 'Prawf eich bod wedi newid eich enw. Er enghraifft, gweithred newid enw neu ddatganiad statudol.', }, - documentsByEmail: 'Anfon dogfennau trwy e-bost', - documentsByEmailSteps: { - step1: 'Cymerwch lun neu sganiwch y ddogfen ', - step2: 'Gwnewch yn siŵr bod y ddelwedd yn dangos y ddogfen gyfan a bod modd darllen yr holl destun', - step3: 'Atodwch y ddelwedd i neges e-bost ', - step4: `Dylech gynnwys eich cyfeirnod yn y llinell pwnc: ${referenceNumber}`, - step5: 'Anfonwch y dogfennau i:', + documentsByOnlineForm: 'Anfon dogfennau drwy ddefnyddio ein ffurflen ar-lein', + documentsByOnlineFormSteps: { + line1: 'Gallwch anfon lluniau neu sganiau o’ch dogfennau atom trwy ', + line2: 'llwytho gan ddefnyddio ein ffurflen ar-lein.', + line3: + "Gwnewch yn siŵr eich bod yn dilyn y cyfarwyddiadau ar sut i lwytho eich dogfennau'n ofalus neu gellid eu gwrthod, gan arwain at oedi pellach.", }, documentsByPost: 'Anfon eich dogfennau drwy’r post', documentsByPostSteps: { @@ -186,7 +192,7 @@ const cy: typeof en = ( step2: 'Postiwch y dogfennau gwreiddiol i:', }, documentsByPostMoreDetails: - 'Rhaid i chi bostio’r dogfennau gwreiddiol neu gopïau ardystiedig. Bydd eich tystysgrif priodas yn cael ei dychwelyd i chi, os ydych yn ei phostio. Ni fydd y dogfennau eraill yn cael eu dychwelyd.', + 'Gwnewch yn siŵr eich bod hefyd yn cynnwys cyfeiriad dychwelyd yn eich ymateb. Bydd unrhyw ddogfennau y byddwch yn eu hanfon, fel tystysgrifau priodas, tystysgrifau geni, pasbortau neu weithred newid enw yn cael eu dychwelyd atoch. Ni fydd y dogfennau eraill yn cael eu dychwelyd.', subHeading3: `Gwneud cais i gyflwyno papurau’r ${isDivorce ? 'ysgariad' : 'bartneriaeth sifil'} mewn ffordd arall`, line3: { p1: `Mae angen i chi wneud cais i gyflwyno papurau’r ${ @@ -218,8 +224,8 @@ const cy: typeof en = ( line11: `Fe gewch y dogfennau y bydd angen i chi eu hanfon at eich ${partner} drwy e-bost a drwy’r post, ar ôl i’r cais gael ei wirio.`, subHeading5: 'Rhannu eich arian a’ch eiddo', line12: { - part1: `Fel arfer, mae’n symlach ac yn costio llai os ydych yn cytuno gyda’ch ${partner} ynghylch sut i rannu eich arian a’ch eiddo.`, - part2: 'Cael cymorth i gytuno ar faterion.', + part1: `Fel arfer, mae’n symlach ac yn costio llai os ydych yn cytuno gyda’ch ${partner} ar sut i rannu eich arian a’ch eiddo.`, + part2: 'Cael cymorth i gytuno.', link: config.get('govukUrls.mediation'), }, line13: { @@ -240,11 +246,17 @@ const cy: typeof en = ( }, subHeading6: 'Os oes arnoch angen cymorth', line16: { - part1: 'Gall staff y llys eich helpu gyda’ch cais. Ni allant roi cyngor cyfreithiol i chi. Dylech siarad â ', + part1: + 'Gall staff y llys eich helpu gyda’ch cais. Ni allant roi cyngor cyfreithiol i chi. Os oes angen cyngor cyfreithiol arnoch, dylech siarad â ', linkText: 'chyfreithiwr neu gynghorydd cyfreithiol', link: config.get('govukUrls.legalAdvisor'), }, + subHeading7: 'Ymweld â’ch gwasanaeth ceisiadau', + line17: { + part1: `Gallwch weld cynnydd eich cais yn y gwasanaeth ceisiadau.`, + }, webChat, + useOurOnlineForm: 'Defnyddio ein ffurflen ar-lein', sendUsAMessage: 'Anfonwch neges atom ', telephone: 'Ffoniwch', telephoneNumber: `Rhif ffôn: ${telephoneNumber}`, @@ -259,9 +271,9 @@ const cy: typeof en = ( link: config.get('govukUrls.domesticAbuse'), }, feedback: "Helpwch ni i wella'r gwasanaeth hwn", - feedbackLine1: 'Complete this short, 5-minute survey to help improve our services for you and others.', + feedbackLine1: 'Cwblhewch yr arolwg 5 munud hwn i helpu i wella ein gwasanaethau i chi ac eraill.', feedbackLine2: { - part1: 'Mae hwn yn wasanaeth newydd.', + part1: 'Rhoi adborth.', link: feedbackLink, }, }); diff --git a/src/main/steps/applicant1/application-submitted/progress-bar.njk b/src/main/steps/applicant1/application-submitted/progress-bar.njk deleted file mode 100644 index b5a44fc3c5..0000000000 --- a/src/main/steps/applicant1/application-submitted/progress-bar.njk +++ /dev/null @@ -1,74 +0,0 @@ -{% macro textWithVisuallyHiddenSpan(text, isComplete) %} - {{text}} {{'' if isComplete else 'not '}}completed -{% endmacro %} - -{% if isJointApplication %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAtOrAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.state() == 'FinalOrderComplete') - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% else %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(response, displayState.isAfter('IssuedToBailiff')) - }, - complete: displayState.isAfter('IssuedToBailiff'), - active: displayState.isAtOrAfter('AwaitingAos') and displayState.isBefore('Holding'), - interval: weeksToResponse - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.isAtOrAfter('FinalOrderPending')) - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% endif %} - -
-
-
    - {% for item in items %} -
  1. - - {{ item.label.html | safe if item.label.html else item.label.text }} - {% if item.interval %} - - {{ item.interval }} - - {% endif %} -
  2. - {% endfor %} -
-
-
diff --git a/src/main/steps/applicant1/application-submitted/template.njk b/src/main/steps/applicant1/application-submitted/template.njk index a5754a9629..b161f4b8e9 100644 --- a/src/main/steps/applicant1/application-submitted/template.njk +++ b/src/main/steps/applicant1/application-submitted/template.njk @@ -15,11 +15,8 @@ {{ referenceNumber }} -

{{ confirmationEmail }}

- - {% include "./progress-bar.njk" %} - +
{% if userCase.applicant1CannotUpload or userCase.applicant2CannotUpload or userCase.iWantToHavePapersServedAnotherWay %}

{{ subHeading1 }}

{{ line1 }}

@@ -32,20 +29,13 @@ {% endfor %} - {% set sendingDocumentsByEmail %} -
    - {% for property, step in documentsByEmailSteps %} - {% if loop.last %} -
  1. {{ step }}{{ contactEmail }}
  2. - {% else %} -
  3. {{ step }}
  4. - {% endif %} - {% endfor %} -
+ {% set sendingDocumentsByOnlineForm %} +

{{ documentsByOnlineFormSteps.line1 }} {{ documentsByOnlineFormSteps.line2}}

+

{{ documentsByOnlineFormSteps.line3 }}

{% endset %} {{ govukDetails({ - summaryText: documentsByEmail, - html: sendingDocumentsByEmail + summaryText: documentsByOnlineForm, + html: sendingDocumentsByOnlineForm }) }} {% set sendingDocumentsByPost %} @@ -94,21 +84,23 @@

{{ line13.part1 }}{{ line13.part2 }}

{{ line14.part1 }}{{ line14.part2 }}

{{ line15.part1 }}{{ line15.part2 }}

+

{{ subHeading7 }}

+

{{ line17.part1|safe}}

{{ subHeading6 }}

{{ line16.part1 }}{{ line16.linkText }}

{{ webChat }}

{% include "webchat/link-to-webchat.njk" %}

{{ sendUsAMessage }}

-

{{ contactEmail }}

+

{{ useOurOnlineForm }}

{{ telephone }}

{{ telephoneNumber }}

{{ openingTimes }}

{{ telephoneCharges.part1 }}

{{ domesticAbuse.part1 }}{{ domesticAbuse.part2 }}

-
-
-

{{ feedback }}

+
+
+

{{ feedback }}

{{ feedbackLine1 }}

{{ feedbackLine2.part1 }}

diff --git a/src/main/steps/applicant1/hub-page/content.ts b/src/main/steps/applicant1/hub-page/content.ts index 586fe46c99..10eb27f178 100644 --- a/src/main/steps/applicant1/hub-page/content.ts +++ b/src/main/steps/applicant1/hub-page/content.ts @@ -180,12 +180,6 @@ const cy: typeof en = ({ }: CommonContent) => ({ title: `${getName(userCase, 'applicant1')} & ${getName(userCase, 'applicant2')}`, referenceNumber: `Cyfeirnod: ${referenceNumber}`, - applicationSubmitted: 'Application submitted', - response: 'Response', - conditionalOrderApplication: 'Conditional order application', - conditionalOrderGranted: 'Conditional order granted', - finalOrderApplication: 'Final order application', - applicationEnded: isDivorce ? 'Divorced' : 'Civil partnership ended', subHeading1: userCase.state === 'AwaitingClarification' ? 'Beth sydd angen i chi ei wneud nawr' : 'Diweddariad diweddaraf', subHeading2: 'Gwybodaeth ddefnyddiol', diff --git a/src/main/steps/applicant1/hub-page/joint/content.ts b/src/main/steps/applicant1/hub-page/joint/content.ts index d1ba022405..efe4105d7d 100644 --- a/src/main/steps/applicant1/hub-page/joint/content.ts +++ b/src/main/steps/applicant1/hub-page/joint/content.ts @@ -3,7 +3,7 @@ import dayjs from 'dayjs'; import { getFormattedDate } from '../../../../app/case/answers/formatDate'; import { CaseWithId, Checkbox } from '../../../../app/case/case'; -import { State, YesOrNo } from '../../../../app/case/definition'; +import { DocumentType, State, YesOrNo } from '../../../../app/case/definition'; import { TranslationFn } from '../../../../app/controller/GetController'; import { SupportedLanguages } from '../../../../modules/i18n'; import type { CommonContent } from '../../../common/common.content'; @@ -31,16 +31,25 @@ const hubPageSubheading = ( } }; -const en = ({ isDivorce, userCase, partner, isApplicant2 }: CommonContent) => ({ +const en = ({ + isDivorce, + userCase, + partner, + isApplicant2, + isJointApplication, + referenceNumber, + telephoneNumber, +}: CommonContent) => ({ subHeading1: hubPageSubheading(userCase), applicationSubmittedLatestUpdate: { - line1: `Your application ${isDivorce ? 'for divorce' : 'to end your civil partnership'} has been submitted - and checked by court staff. It has been sent to you and your ${partner} by ${ - userCase.applicant1AgreeToReceiveEmails ? 'email' : 'post' - }.`, - line2: `You should confirm that you have received your application ${ - isDivorce ? 'for divorce' : 'to end your civil partnership' - }.`, + line1: `Your joint application ${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + userCase.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES + ? 'and help with fees reference number ' + : '' + } will be checked by court staff. You will receive an email notification by ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day') + )} confirming whether it has been accepted. Check your junk or spam email folder.`, }, applicantConfirmedReceiptLatestUpdate: { line1: `You have confirmed receipt of the ${ @@ -142,6 +151,7 @@ const en = ({ isDivorce, userCase, partner, isApplicant2 }: CommonContent) => ({ ? 'You will receive an email confirming whether it has been granted once a Judge has made a decision.' : 'You should receive an email within 2 working days, confirming whether the final order has been granted.', }, + finalOrderComplete: {}, intendToSwitchToSoleFinalOrder: { line1: `The court has notified your ${partner} by email that you are intending to apply for a final order as a sole applicant.`, line2: `You will be able to apply for a final order from ${getFormattedDate( @@ -161,19 +171,85 @@ const en = ({ isDivorce, userCase, partner, isApplicant2 }: CommonContent) => ({ line1: "Your application is with the court and will be referred to a judge to consider your request. You should hear back from the court about the judge's decision.", }, + sendDocumentLine1: 'Your application will not be processed until you have done the following:', + sendDocumentHeading: 'Send your documents to the court', + line2: 'You need to send the following documents to the court because you did not upload them earlier:', + documents: { + [DocumentType.MARRIAGE_CERTIFICATE]: + userCase.inTheUk === YesOrNo.NO + ? `Your original foreign ${isDivorce ? 'marriage' : 'civil partnership'} certificate` + : `Your original ${isDivorce ? 'marriage' : 'civil partnership'} certificate or a certified copy`, + [DocumentType.MARRIAGE_CERTIFICATE_TRANSLATION]: `A certified translation of your foreign ${ + isDivorce ? 'marriage' : 'civil partnership' + } certificate`, + [DocumentType.NAME_CHANGE_EVIDENCE]: + 'Proof that you changed your name. For example, deed poll or statutory declaration.', + }, + documentsByOnlineForm: 'Sending documents using our online form', + documentsByOnlineFormSteps: { + line1: 'You can send photographs or scans of your documents to us by', + line2: 'uploading them using our online form.', + line3: + 'Make sure you follow the instructions on how to upload your documents carefully or they could be rejected, resulting in further delays.', + }, + documentsByPost: 'Sending your documents by post', + documentsByPostSteps: { + step1: `Write your reference number on each document: ${referenceNumber}`, + step2: 'Post the original documents to:', + }, + documentsByPostMoreDetails: + 'Make sure you also include in your response a return address. Any cherished documents you send, such as marriage certificates, birth certificates, passports or deed polls will be returned to you. Other documents will not be returned.', + + subHeading3: `Apply to serve the ${isDivorce ? 'divorce' : 'civil partnership'} papers another way`, + line3: { + p1: `You need to apply to serve the ${ + isDivorce ? 'divorce' : 'ending your civil partnership' + } papers to your ${partner} another way. This is because you did not provide their email and postal address. You could apply to serve them by email only, text message or social media.`, + p2: 'You will need to fill out a separate paper D11 form and send it to the court. The form can be used to make different applications so only fill out the relevant sections.', + }, + line4: { + part1: `Apply to serve the ${isDivorce ? 'divorce' : 'civil partnership'} papers another way`, + link: config.get('govukUrls.d11Form'), + }, + subHeading4: 'What happens next', + line5: `Your${isJointApplication ? ' joint' : ''} application${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + (!isJointApplication || userCase.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES) + ? ' and help with fees reference number' + : '' + } will be checked by court staff. You will receive an email notification by ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day') + )} confirming whether it has been accepted. Check your junk or spam email folder.`, + line6: `Your ${partner} will then be sent a copy of the application. They will be asked to check the information and respond. If they do not respond then you will be told what you can do next to progress the application.`, + line7: `Your ${partner}’s solicitor will be contacted by the court, and asked to confirm they are representing them. They will be sent a copy of the application and asked to respond.`, + line8: `If you want to ‘serve’ (send) the documents to your ${partner} yourself then phone ${telephoneNumber} to request it. Otherwise the court will do it.`, + line9: `If you want the court to serve (send) the application by post instead of by email, then phone ${telephoneNumber}.`, + line10: `The address you have provided for your ${partner} is outside of England and Wales. That means you are responsible for ‘serving’ (sending) the court documents, which notify your ${partner} about ${ + isDivorce ? 'the divorce' : 'ending the civil partnership' + }.`, + line11: `You will receive the documents that you need to send to your ${partner} by email and letter, after the application has been checked.`, }); -const cy: typeof en = ({ isDivorce, userCase, partner, isApplicant2 }: CommonContent) => ({ +const cy: typeof en = ({ + isDivorce, + userCase, + partner, + isApplicant2, + isJointApplication, + referenceNumber, + telephoneNumber, +}: CommonContent) => ({ subHeading1: hubPageSubheading(userCase, SupportedLanguages.Cy), applicationSubmittedLatestUpdate: { - line1: `Mae eich cais ${ - isDivorce ? 'am ysgariad' : "i ddod â'ch partneriaeth sifil i ben" - } wedi'i gyflwyno a'i wirio gan staff y llys. Fe'i anfonwyd atoch chi a'ch ${partner} ${ - userCase.applicant1AgreeToReceiveEmails ? 'drwy e-bost' : 'drwy’r post' - }.`, - line2: `Dylech gadarnhau eich bod wedi cael eich cais ${ - isDivorce ? 'am ysgariad' : "i ddod â'ch partneriaeth sifil i ben" - }.`, + line1: `Bydd staff y llys yn gwirio eich cais ${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + userCase.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES + ? 'a’ch cyfeirnod Help i Dalu Ffioedd ' + : '' + }. Fe gewch neges e-bost erbyn ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day'), + SupportedLanguages.Cy + )} yn cadarnhau p’un a yw wedi’i dderbyn. Gwiriwch eich ffolder ‘junk’ neu ‘spam’.`, }, applicantConfirmedReceiptLatestUpdate: { line1: `Rydych wedi cadarnhau eich bod wedi cael y ${ @@ -309,6 +385,63 @@ const cy: typeof en = ({ isDivorce, userCase, partner, isApplicant2 }: CommonCon line1: 'Mae eich cais wedi cyrraedd y llys a bydd yn cael ei gyfeirio at farnwr i ystyried eich cais. Dylech glywed gan\n y llys am benderfyniad y barnwr.', }, + sendDocumentLine1: 'Ni fydd eich cais yn cael ei brosesu hyd nes y byddwch wedi gwneud y canlynol:', + sendDocumentHeading: 'Anfon eich dogfennau i’r llys', + line2: 'Mae angen i chi anfon y dogfennau canlynol i’r llys gan na wnaethoch eu llwytho yn gynharach:', + documents: { + [DocumentType.MARRIAGE_CERTIFICATE]: + userCase.inTheUk === YesOrNo.NO + ? `Eich tystysgrif ${isDivorce ? 'priodas' : 'partneriaeth sifil'} dramor wreiddiol` + : `Eich tystysgrif ${isDivorce ? 'priodas' : 'partneriaeth sifil'} wreiddiol neu gopi ardystiedig ohoni`, + [DocumentType.MARRIAGE_CERTIFICATE_TRANSLATION]: `Cyfieithiad ardystiedig o’ch tystysgrif ${ + isDivorce ? 'priodas' : 'partneriaeth sifil' + } dramor`, + [DocumentType.NAME_CHANGE_EVIDENCE]: + 'Prawf eich bod wedi newid eich enw. Er enghraifft, gweithred newid enw neu ddatganiad statudol.', + }, + documentsByOnlineForm: 'Anfon dogfennau drwy ddefnyddio ein ffurflen ar-lein', + documentsByOnlineFormSteps: { + line1: 'Gallwch anfon lluniau neu sganiau o’ch dogfennau atom trwy ', + line2: 'llwytho gan ddefnyddio ein ffurflen ar-lein.', + line3: + "Gwnewch yn siŵr eich bod yn dilyn y cyfarwyddiadau ar sut i lwytho eich dogfennau'n ofalus neu gellid eu gwrthod, gan arwain at oedi pellach.", + }, + documentsByPost: 'Anfon eich dogfennau drwy’r post', + documentsByPostSteps: { + step1: `Ysgrifennwch eich cyfeirnod ar bob dogfen: ${referenceNumber}`, + step2: 'Postiwch y dogfennau gwreiddiol i:', + }, + documentsByPostMoreDetails: + 'Gwnewch yn siŵr eich bod hefyd yn cynnwys cyfeiriad dychwelyd yn eich ymateb. Bydd unrhyw ddogfennau y byddwch yn eu hanfon, fel tystysgrifau priodas, tystysgrifau geni, pasbortau neu weithred newid enw yn cael eu dychwelyd atoch. Ni fydd y dogfennau eraill yn cael eu dychwelyd.', + subHeading3: `Gwneud cais i gyflwyno papurau’r ${isDivorce ? 'ysgariad' : 'bartneriaeth sifil'} mewn ffordd arall`, + line3: { + p1: `Mae angen i chi wneud cais i gyflwyno papurau’r ${ + isDivorce ? 'ysgariad' : 'bartneriaeth sifil' + } ar eich ${partner} mewn ffordd arall. Y rheswm dros hyn yw oherwydd ni wnaethoch ddarparu eu cyfeiriad e-bost neu gyfeiriad post. Gallwch wneud cais i’w cyflwyno arnynt drwy e-bost yn unig, drwy neges testun neu gyfryngau cymdeithasol.`, + p2: 'Bydd angen i chi lenwi ffurflen bapur D11 a’i hanfon i’r llys. Gallwch ddefnyddio’r ffurflen i wneud ceisiadau gwahanol, felly dim ond yr adrannau perthnasol sydd angen i chi eu llenwi.', + }, + line4: { + part1: `Gwneud cais i gyflwyno papurau’r ${isDivorce ? 'ysgariad' : 'bartneriaeth sifil'} mewn ffordd arall`, + link: config.get('govukUrls.d11Form'), + }, + subHeading4: 'Beth fydd yn digwydd nesaf', + line5: `Bydd staff y llys yn gwirio eich cais ${isJointApplication ? ' ar y cyd' : ''}${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + (!isJointApplication || userCase.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES) + ? ' a’ch cyfeirnod Help i Dalu Ffioedd' + : '' + }. Fe gewch neges e-bost erbyn ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day'), + SupportedLanguages.Cy + )} yn cadarnhau p’un a yw wedi’i dderbyn. Gwiriwch eich ffolder ‘junk’ neu ‘spam’.`, + line6: `Yna fe anfonir copi o’r cais at eich ${partner}. Os na fyddant yn ymateb, fe ddywedir wrthych beth allwch ei wneud nesaf i symud y cais yn ei flaen.`, + line7: `Bydd y llys yn cysylltu â chyfreithiwr eich ${partner} ac yn gofyn iddo gadarnhau ei fod yn cynrychioli eich ${partner}. Fe anfonir copi o’r cais ato ac fe ofynnir iddo ymateb.`, + line8: `Os ydych eisiau ‘cyflwyno’ (anfon) y dogfennau ar eich ${partner} eich hun, yna ffoniwch ${telephoneNumber}. Fel arall, bydd y llys yn gwneud hyn ar eich rhan.`, + line9: `Os ydych eisiau i’r llys gyflwyno (anfon) y cais drwy’r post yn hytrach na drwy e-bost, ffoniwch ${telephoneNumber}.`, + line10: `Mae’r cyfeiriad rydych wedi’i ddarparu ar gyfer eich ${partner} y tu allan i Gymru a Lloegr. Mae hynny’n golygu eich bod chi’n gyfrifol am ‘gyflwyno’ (anfon) dogfennau’r llys, sydd yn hysbysu eich ${partner} am ${ + isDivorce ? 'yr ysgariad' : 'ddiweddu’r bartneriaeth sifil' + }.`, + line11: `Fe gewch y dogfennau y bydd angen i chi eu hanfon at eich ${partner} drwy e-bost a drwy’r post, ar ôl i’r cais gael ei wirio.`, }); const languages = { @@ -360,6 +493,11 @@ export const generateContent: TranslationFn = content => { switchToSoleFinalOrderStatus.hasSwitchToSoleFoIntentionNotificationPeriodExpired, }); + const cannotUploadDocuments = new Set([ + ...(userCase.applicant1CannotUploadDocuments || []), + ...(userCase.applicant2CannotUploadDocuments || []), + ]); + return { ...languages[content.language](content), displayState, @@ -376,5 +514,6 @@ export const generateContent: TranslationFn = content => { isFinalOrderCompleteState, finalOrderEligibleAndSecondInTimeFinalOrderNotSubmittedWithin14Days, isIntendingAndAbleToSwitchToSoleFinalOrder: switchToSoleFinalOrderStatus.isIntendingAndAbleToSwitchToSoleFo, + cannotUploadDocuments, }; }; diff --git a/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.test.ts b/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.test.ts index a113560b0e..5f5d2e45c2 100644 --- a/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.test.ts +++ b/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.test.ts @@ -1,6 +1,8 @@ +import { Checkbox } from '../../../../app/case/case'; import { DivorceOrDissolution, State, YesOrNo } from '../../../../app/case/definition'; import { HubTemplate } from '../../../common/hubTemplates'; import { currentStateFn } from '../../../state-sequence'; +import { getSoleHubTemplate } from '../sole/soleTemplateSelector'; import { getJointHubTemplate } from './jointTemplateSelector'; @@ -25,6 +27,12 @@ describe('JointTemplateSelector test', () => { expect(jointTemplate).toBe(HubTemplate.Holding); }); + test('should show /holding.njk for state Submitted', () => { + const theState = displayState.at(State.Submitted); + const jointTemplate = getJointHubTemplate(theState, userCase); + expect(jointTemplate).toBe(HubTemplate.Holding); + }); + test('should show /conditional-order-pronounced.njk for state ConditionalOrderPronounced', () => { const theState = displayState.at(State.ConditionalOrderPronounced); const jointTemplate = getJointHubTemplate(theState, userCase); @@ -156,4 +164,26 @@ describe('JointTemplateSelector test', () => { const jointTemplate = getJointHubTemplate(theState, userCase); expect(jointTemplate).toBe(HubTemplate.PendingHearingOutcome); }); + + test('should show /awaiting-documents.njk for state AwaitingDocuments', () => { + const theState = displayState.at(State.AwaitingDocuments); + const jointTemplate = getJointHubTemplate(theState, userCase); + expect(jointTemplate).toBe(HubTemplate.AwaitingDocuments); + }); + + test('should show /awaiting-documents.njk for state AwaitingHWFDecision and reason is "cannot upload documents"', () => { + const userCaseWithApplicant1CannotUploadDocuments = { + ...userCase, + applicant1CannotUpload: Checkbox.Checked, + }; + const theState = displayState.at(State.AwaitingHWFDecision); + const soleTemplate = getSoleHubTemplate(theState, userCaseWithApplicant1CannotUploadDocuments, false, false); + expect(soleTemplate).toBe(HubTemplate.AwaitingDocuments); + }); + + test('should show /holding.njk for state AwaitingHWFDecision', () => { + const theState = displayState.at(State.AwaitingHWFDecision); + const jointTemplate = getJointHubTemplate(theState, userCase); + expect(jointTemplate).toBe(HubTemplate.Holding); + }); }); diff --git a/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.ts b/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.ts index 2e6c868435..10ab99149d 100644 --- a/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.ts +++ b/src/main/steps/applicant1/hub-page/joint/jointTemplateSelector.ts @@ -1,4 +1,4 @@ -import { CaseWithId } from '../../../../app/case/case'; +import { CaseWithId, Checkbox } from '../../../../app/case/case'; import { State, YesOrNo } from '../../../../app/case/definition'; import { HubTemplate } from '../../../common/hubTemplates'; import { StateSequence } from '../../../state-sequence'; @@ -21,7 +21,8 @@ export const getJointHubTemplate = ( case State.AwaitingPronouncement: { return HubTemplate.AwaitingPronouncement; } - case State.Holding: { + case State.Holding: + case State.Submitted: { return HubTemplate.Holding; } case State.ConditionalOrderPronounced: { @@ -61,6 +62,10 @@ export const getJointHubTemplate = ( case State.PendingHearingDate: { return HubTemplate.PendingHearingOutcome; } + case State.AwaitingDocuments: + return HubTemplate.AwaitingDocuments; + case State.AwaitingHWFDecision: + return userCase.applicant1CannotUpload === Checkbox.Checked ? HubTemplate.AwaitingDocuments : HubTemplate.Holding; default: { if ( displayState.isAfter('Holding') && diff --git a/src/main/steps/applicant1/hub-page/joint/latest-update-content/awaiting-documents.njk b/src/main/steps/applicant1/hub-page/joint/latest-update-content/awaiting-documents.njk new file mode 100644 index 0000000000..3f75cfd4e4 --- /dev/null +++ b/src/main/steps/applicant1/hub-page/joint/latest-update-content/awaiting-documents.njk @@ -0,0 +1 @@ +{% include "../../sole/latest-update-content/awaiting-documents.njk" %} diff --git a/src/main/steps/applicant1/hub-page/progressBarLabels.test.ts b/src/main/steps/applicant1/hub-page/progressBarLabels.test.ts index 9afc4594ff..efc092763d 100644 --- a/src/main/steps/applicant1/hub-page/progressBarLabels.test.ts +++ b/src/main/steps/applicant1/hub-page/progressBarLabels.test.ts @@ -9,14 +9,12 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, true); expect(labels).toEqual({ submitted: 'Submitted', - weeksToResponse: '4 weeks', + courtChecks: 'Court checks', response: 'Response', - weeksToConditionalOrder: '20 weeks', conditionalOrder: 'Conditional order', - weeksToFinalOrder: '6 weeks', finalOrder: 'Final order (Divorced)', progressBarAriaLabel: - 'A progress bar showing the application has been submitted. The next steps are receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + 'A progress bar showing the application has been submitted. The next steps are court checks, receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', }); }); @@ -25,14 +23,12 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(false, displayState, true); expect(labels).toEqual({ submitted: 'Submitted', - weeksToResponse: '4 weeks', + courtChecks: 'Court checks', response: 'Response', - weeksToConditionalOrder: '20 weeks', conditionalOrder: 'Conditional order', - weeksToFinalOrder: '6 weeks', finalOrder: 'Final order (Civil partnership ended)', progressBarAriaLabel: - 'A progress bar showing the application has been submitted. The next steps are receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + 'A progress bar showing the application has been submitted. The next steps are court checks, receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', }); }); @@ -41,14 +37,12 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, false); expect(labels).toEqual({ submitted: "Wedi'i gyflwyno", - weeksToResponse: '2 wythnos', + courtChecks: 'Gwiriadau llys', response: 'Ymateb', - weeksToConditionalOrder: '20 wythnos', conditionalOrder: 'Gorchymyn amodol', - weeksToFinalOrder: '6 wythnos', finalOrder: 'Gorchymyn terfynol (Wedi ysgaru)', progressBarAriaLabel: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw gwiriadau’r llys, cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', }); }); @@ -57,14 +51,12 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(false, displayState, false); expect(labels).toEqual({ submitted: "Wedi'i gyflwyno", - weeksToResponse: '2 wythnos', + courtChecks: 'Gwiriadau llys', response: 'Ymateb', - weeksToConditionalOrder: '20 wythnos', conditionalOrder: 'Gorchymyn amodol', - weeksToFinalOrder: '6 wythnos', finalOrder: 'Gorchymyn terfynol (Partneriaeth sifil wedi dod i ben)', progressBarAriaLabel: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw gwiriadau’r llys, cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', }); }); @@ -73,7 +65,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, true); expect(labels).toMatchObject({ progressBarAriaLabel: - 'A progress bar showing the application has been submitted. The next steps are receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + 'A progress bar showing the application has been submitted. The next steps are court checks, receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', }); }); @@ -82,7 +74,16 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, true); expect(labels).toMatchObject({ progressBarAriaLabel: - 'A progress bar showing the application has been submitted and the response has been received. The next steps show a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + 'A progress bar showing the application has been submitted, court checks completed and the response has been received. The next steps show a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + }); + }); + + test('should return response arial label when state is at or after awaiting aos', () => { + const displayState = currentStateFn(State.AwaitingAos); + const labels = getProgressBarContent(true, displayState, true); + expect(labels).toMatchObject({ + progressBarAriaLabel: + 'A progress bar showing the application has been submitted and court checks completed. The next steps are receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', }); }); @@ -91,7 +92,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, true); expect(labels).toMatchObject({ progressBarAriaLabel: - 'A progress bar showing the application has been submitted, the response has been received and a conditional order has been granted. The next step shows a final order being granted, which is the final stage in the process. This step is not complete yet.', + 'A progress bar showing the application has been submitted, court checks completed, the response has been received and a conditional order has been granted. The next step shows a final order being granted, which is the final stage in the process. This step is not complete yet.', }); }); @@ -100,7 +101,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, true); expect(labels).toMatchObject({ progressBarAriaLabel: - 'A progress bar showing the application has been submitted, the response has been received, a conditional order has been granted and a final order has been granted. All steps are now complete.', + 'A progress bar showing the application has been submitted, court checks completed, the response has been received, a conditional order has been granted and a final order has been granted. All steps are now complete.', }); }); @@ -109,7 +110,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, false); expect(labels).toMatchObject({ progressBarAriaLabel: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw gwiriadau’r llys, cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', }); }); @@ -118,7 +119,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, false); expect(labels).toMatchObject({ progressBarAriaLabel: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno a bod yr ymateb wedi dod i law. Mae’r camau nesaf yn dangos gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf yn y broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, gwiriadau’r llys wedi’u cwblhau a bod yr ymateb wedi dod i law. Mae’r camau nesaf yn dangos gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf yn y broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', }); }); @@ -127,7 +128,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, false); expect(labels).toMatchObject({ progressBarAriaLabel: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, mae’r ymateb wedi dod i law, ac mae gorchymyn amodol wedi’i gymeradwyo. Mae’r cam nesaf yn dangos y gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw cam hwn wedi’i gwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, gwiriadau’r llys wedi’u cwblhau, mae’r ymateb wedi dod i law, ac mae gorchymyn amodol wedi’i gymeradwyo. Mae’r cam nesaf yn dangos y gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw cam hwn wedi’i gwblhau eto.', }); }); @@ -136,7 +137,7 @@ describe('getProgressBarContent', () => { const labels = getProgressBarContent(true, displayState, false); expect(labels).toMatchObject({ progressBarAriaLabel: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, mae’r ymateb wedi dod i law, mae gorchymyn amodol wedi’i gymeradwyo ac mae gorchymyn terfynol wedi’i gymeradwyo. Mae’r holl gamau wedi’u cwblhau bellach.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, gwiriadau’r llys wedi’u cwblhau, mae’r ymateb wedi dod i law, mae gorchymyn amodol wedi’i gymeradwyo ac mae gorchymyn terfynol wedi’i gymeradwyo. Mae’r holl gamau wedi’u cwblhau bellach.', }); }); }); diff --git a/src/main/steps/applicant1/hub-page/progressBarLabels.ts b/src/main/steps/applicant1/hub-page/progressBarLabels.ts index 8ef54017ec..7c17aba755 100644 --- a/src/main/steps/applicant1/hub-page/progressBarLabels.ts +++ b/src/main/steps/applicant1/hub-page/progressBarLabels.ts @@ -2,44 +2,44 @@ import { StateSequence } from '../../state-sequence'; const en = (isDivorce: boolean) => ({ submitted: 'Submitted', - weeksToResponse: '4 weeks', + courtChecks: 'Court checks', response: 'Response', - weeksToConditionalOrder: '20 weeks', conditionalOrder: 'Conditional order', - weeksToFinalOrder: '6 weeks', finalOrder: `Final order (${isDivorce ? 'Divorced' : 'Civil partnership ended'})`, }); const enArialLabels = { submitted: - 'A progress bar showing the application has been submitted. The next steps are receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + 'A progress bar showing the application has been submitted. The next steps are court checks, receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + courtChecks: + 'A progress bar showing the application has been submitted and court checks completed. The next steps are receiving a response, a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', response: - 'A progress bar showing the application has been submitted and the response has been received. The next steps show a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', + 'A progress bar showing the application has been submitted, court checks completed and the response has been received. The next steps show a conditional order being granted and a final order being granted, which is the last stage in the process. The next steps are not complete yet.', conditionalOrder: - 'A progress bar showing the application has been submitted, the response has been received and a conditional order has been granted. The next step shows a final order being granted, which is the final stage in the process. This step is not complete yet.', + 'A progress bar showing the application has been submitted, court checks completed, the response has been received and a conditional order has been granted. The next step shows a final order being granted, which is the final stage in the process. This step is not complete yet.', finalOrder: - 'A progress bar showing the application has been submitted, the response has been received, a conditional order has been granted and a final order has been granted. All steps are now complete.', + 'A progress bar showing the application has been submitted, court checks completed, the response has been received, a conditional order has been granted and a final order has been granted. All steps are now complete.', }; const cy: typeof en = (isDivorce: boolean) => ({ submitted: "Wedi'i gyflwyno", - weeksToResponse: '2 wythnos', + courtChecks: 'Gwiriadau llys', response: 'Ymateb', - weeksToConditionalOrder: '20 wythnos', conditionalOrder: 'Gorchymyn amodol', - weeksToFinalOrder: '6 wythnos', finalOrder: `Gorchymyn terfynol (${isDivorce ? 'Wedi ysgaru' : 'Partneriaeth sifil wedi dod i ben'})`, }); const cyArialLabels: typeof enArialLabels = { submitted: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno. Y camau nesaf yw gwiriadau’r llys, cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + courtChecks: + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno a bod gwiriadau’r llys wedi’u cwblhau. Y camau nesaf yw cael ymateb, gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', response: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno a bod yr ymateb wedi dod i law. Mae’r camau nesaf yn dangos gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf yn y broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, gwiriadau’r llys wedi’u cwblhau a bod yr ymateb wedi dod i law. Mae’r camau nesaf yn dangos gorchymyn amodol yn cael ei gymeradwyo a gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf yn y broses. Nid yw’r camau nesaf wedi’u cwblhau eto.', conditionalOrder: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, mae’r ymateb wedi dod i law, ac mae gorchymyn amodol wedi’i gymeradwyo. Mae’r cam nesaf yn dangos y gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw cam hwn wedi’i gwblhau eto.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, gwiriadau’r llys wedi’u cwblhau, mae’r ymateb wedi dod i law, ac mae gorchymyn amodol wedi’i gymeradwyo. Mae’r cam nesaf yn dangos y gorchymyn terfynol yn cael ei gymeradwyo, sef y cam olaf o’r broses. Nid yw cam hwn wedi’i gwblhau eto.', finalOrder: - 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, mae’r ymateb wedi dod i law, mae gorchymyn amodol wedi’i gymeradwyo ac mae gorchymyn terfynol wedi’i gymeradwyo. Mae’r holl gamau wedi’u cwblhau bellach.', + 'Bar cynnydd yn dangos bod y cais wedi’i gyflwyno, gwiriadau’r llys wedi’u cwblhau, mae’r ymateb wedi dod i law, mae gorchymyn amodol wedi’i gymeradwyo ac mae gorchymyn terfynol wedi’i gymeradwyo. Mae’r holl gamau wedi’u cwblhau bellach.', }; export const getProgressBarContent = ( @@ -61,11 +61,14 @@ const getAriaLabel = (displayState: StateSequence, isEnglish: boolean): string = return ariaLabels.conditionalOrder; } else if (displayState.isAfter('IssuedToBailiff')) { return ariaLabels.response; + } else if (displayState.isAtOrAfter('AwaitingAos')) { + return ariaLabels.courtChecks; } return ariaLabels.submitted; }; interface ProgressBar { + courtChecks; submitted: string; response: string; conditionalOrder: string; diff --git a/src/main/steps/applicant1/hub-page/right-column/content.ts b/src/main/steps/applicant1/hub-page/right-column/content.ts index 7ca9f25302..3e56664349 100644 --- a/src/main/steps/applicant1/hub-page/right-column/content.ts +++ b/src/main/steps/applicant1/hub-page/right-column/content.ts @@ -3,7 +3,15 @@ import { TranslationFn } from '../../../../app/controller/GetController'; import { CommonContent } from '../../../common/common.content'; import { APPLICANT_2, CHECK_CONTACT_DETAILS, RESPONDENT } from '../../../urls'; -const en = ({ isDivorce, isApplicant2, userCase, telephoneNumber, openingTimes }: CommonContent) => ({ +const en = ({ + isDivorce, + isApplicant2, + userCase, + telephoneNumber, + openingTimes, + closingTimes, + contactWebForm, +}: CommonContent) => ({ applicationDownload: { reference: 'Divorce-Application', link: `/downloads/${isDivorce ? 'divorce-application' : 'application-to-end-civil-partnership'}`, @@ -82,6 +90,11 @@ const en = ({ isDivorce, isApplicant2, userCase, telephoneNumber, openingTimes } link: '/downloads/conditional-order-refusal', text: 'View the conditional order refusal (PDF)', }, + finalOrderApplicationDownload: { + reference: 'Final-Order-Application', + link: '/downloads/final-order-application', + text: 'View the final order application (PDF)', + }, finalOrderGrantedDocumentDownload: { reference: 'Final-Order-Granted', link: '/downloads/final-order-granted', @@ -95,15 +108,29 @@ const en = ({ isDivorce, isApplicant2, userCase, telephoneNumber, openingTimes } gettingHelp: 'Getting help', telephone: { heading: 'Phone', - openingTimes: `(${openingTimes})`, + openingTimes: `${openingTimes}`, + closingTimes: `${closingTimes}`, number: telephoneNumber, }, email: 'Email', post: 'Post', + onlineForm: { + heading: 'Online form', + text: 'Send us a message using our online form', + link: `${contactWebForm}`, + }, }); // @TODO translations -const cy: typeof en = ({ isDivorce, isApplicant2, userCase, telephoneNumber, openingTimes }: CommonContent) => ({ +const cy: typeof en = ({ + isDivorce, + isApplicant2, + userCase, + telephoneNumber, + openingTimes, + closingTimes, + contactWebForm, +}: CommonContent) => ({ applicationDownload: { reference: 'Divorce-Application', link: `/downloads/${isDivorce ? 'divorce-application' : 'application-to-end-civil-partnership'}`, @@ -199,10 +226,16 @@ const cy: typeof en = ({ isDivorce, isApplicant2, userCase, telephoneNumber, ope telephone: { heading: 'Rhif ffôn', openingTimes: `(${openingTimes})`, + closingTimes: `${closingTimes}`, number: telephoneNumber, }, email: 'E-bost', post: "Drwy'r post", + onlineForm: { + heading: 'Online form', + text: 'Anfonwch neges atom drwy ddefnyddio ein ffurflen ar-lein', + link: `${contactWebForm}`, + }, }); const languages = { diff --git a/src/main/steps/applicant1/hub-page/right-column/template.njk b/src/main/steps/applicant1/hub-page/right-column/template.njk index d523b1e6cd..b7bbbb29ac 100644 --- a/src/main/steps/applicant1/hub-page/right-column/template.njk +++ b/src/main/steps/applicant1/hub-page/right-column/template.njk @@ -64,8 +64,8 @@ download={{applicationDownload.reference}}>{{applicationDownload.text}}


{{ gettingHelp }}

{{ telephone.heading }}

-

{{ telephone.number }}
{{ telephone.openingTimes }}

-

{{ email }}

-

{{ contactEmail }}

+

{{ telephone.number }}
{{ telephone.openingTimes }}
{{ telephone.closingTimes }}

+

{{ onlineForm.heading }}

+

{{ onlineForm.text }}

{{ post }}

{{ serviceAddressMacro(serviceAddress) }} diff --git a/src/main/steps/applicant1/hub-page/sole/content.ts b/src/main/steps/applicant1/hub-page/sole/content.ts index 95a8d1c428..6b7e90e7c0 100644 --- a/src/main/steps/applicant1/hub-page/sole/content.ts +++ b/src/main/steps/applicant1/hub-page/sole/content.ts @@ -3,31 +3,40 @@ import dayjs from 'dayjs'; import { getFormattedDate } from '../../../../app/case/answers/formatDate'; import { Checkbox } from '../../../../app/case/case'; -import { AlternativeServiceType, State, YesOrNo } from '../../../../app/case/definition'; +import { + AlternativeServiceType, + Applicant2Represented, + DocumentType, + State, + YesOrNo, +} from '../../../../app/case/definition'; import { TranslationFn } from '../../../../app/controller/GetController'; import { SupportedLanguages } from '../../../../modules/i18n'; +import { isCountryUk } from '../../../applicant1Sequence'; import type { CommonContent } from '../../../common/common.content'; import { currentStateFn } from '../../../state-sequence'; import { FINALISING_YOUR_APPLICATION, HOW_YOU_CAN_PROCEED } from '../../../urls'; import { getSoleHubTemplate } from './soleTemplateSelector'; -const en = ({ isDivorce, partner, userCase }: CommonContent, alternativeServiceType: AlternativeServiceType) => ({ +const en = ( + { isDivorce, partner, userCase, telephoneNumber, referenceNumber, isJointApplication }: CommonContent, + alternativeServiceType: AlternativeServiceType +) => ({ aosAwaitingOrDrafted: { line1: `Your application ${ - isDivorce ? 'for divorce' : 'to end your civil partnership' - } has been submitted and checked by court staff. It's been ‘served’ (sent) to you and your ${partner}${ - userCase.applicant2EmailAddress - ? ' by email' - : userCase.applicant1KnowsApplicant2Address === YesOrNo.YES - ? ' by post' - : '' - }.`, - line2: `Your ${partner} should respond to the ${ - isDivorce ? 'divorce application' : 'application to end your civil partnership' - } by ${getFormattedDate(userCase.dueDate)}.`, - line3: - 'You will be notified by email when they have responded. Or told what you can do next if they do not respond.', + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES ? 'and help with fees reference number ' : '' + } will be checked by court staff. You will receive an email notification by ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day') + )} confirming whether it has been accepted. Check your junk or spam email folder.`, + line2: `Your ${partner} will then be sent a copy of the application. They will be asked to check the information and respond. If they do not respond then you will be told what you can do next to progress the application.`, + line3: `If you want to ‘serve’ (send) the documents to your ${partner} yourself then phone ${telephoneNumber} to request it. Otherwise the court will do it.`, + line4: `If you want the court to serve (send) the application to be served by post instead of by email, then phone ${telephoneNumber}.`, + line5: `The address you have provided for your ${partner} is outside of England and Wales. That means you are responsible for ‘serving’ (sending) the court documents, which notify your ${partner} about ${ + isDivorce ? 'the divorce' : 'ending the civil partnership' + }`, + line6: `You will receive the documents that you need to send to your ${partner} by email and letter, after the application has been checked.`, + line7: `Your ${partner}’s solicitor will be contacted by the court, and asked to confirm they are representing them. They will be sent a copy of the application and asked to respond.`, }, aosDue: { line1: `Your ${partner} should have responded to your ${ @@ -172,6 +181,7 @@ const en = ({ isDivorce, partner, userCase }: CommonContent, alternativeServiceT ? 'You will receive an email confirming whether it has been granted once a Judge has made a decision.' : 'You should receive an email within 2 working days, confirming whether the final order has been granted.', }, + finalOrderComplete: {}, awaitingServiceConsiderationOrBailiffReferral: { line1: 'Your application has been received and will be reviewed by a judge. You will receive an email telling you whether your application has been successful.', @@ -228,32 +238,87 @@ const en = ({ isDivorce, partner, userCase }: CommonContent, alternativeServiceT line1: "Your application is with the court and will be referred to a judge to consider your request. You should hear back from the court about the judge's decision.", }, + sendDocumentLine1: 'Your application will not be processed until you have done the following:', + sendDocumentHeading: 'Send your documents to the court', + line2: 'You need to send the following documents to the court because you did not upload them earlier:', + documents: { + [DocumentType.MARRIAGE_CERTIFICATE]: + userCase.inTheUk === YesOrNo.NO + ? `Your original foreign ${isDivorce ? 'marriage' : 'civil partnership'} certificate` + : `Your original ${isDivorce ? 'marriage' : 'civil partnership'} certificate or a certified copy`, + [DocumentType.MARRIAGE_CERTIFICATE_TRANSLATION]: `A certified translation of your foreign ${ + isDivorce ? 'marriage' : 'civil partnership' + } certificate`, + [DocumentType.NAME_CHANGE_EVIDENCE]: + 'Proof that you changed your name. For example, deed poll or statutory declaration.', + }, + documentsByOnlineForm: 'Sending documents using our online form', + documentsByOnlineFormSteps: { + line1: 'You can send photographs or scans of your documents to us by', + line2: 'uploading them using our online form.', + line3: + 'Make sure you follow the instructions on how to upload your documents carefully or they could be rejected, resulting in further delays.', + }, + documentsByPost: 'Sending your documents by post', + documentsByPostSteps: { + step1: `Write your reference number on each document: ${referenceNumber}`, + step2: 'Post the original documents to:', + }, + documentsByPostMoreDetails: + 'Make sure you also include in your response a return address. Any cherished documents you send, such as marriage certificates, birth certificates, passports or deed polls will be returned to you. Other documents will not be returned.', + + subHeading3: `Apply to serve the ${isDivorce ? 'divorce' : 'civil partnership'} papers another way`, + line3: { + p1: `You need to apply to serve the ${ + isDivorce ? 'divorce' : 'ending your civil partnership' + } papers to your ${partner} another way. This is because you did not provide their email and postal address. You could apply to serve them by email only, text message or social media.`, + p2: 'You will need to fill out a separate paper D11 form and send it to the court. The form can be used to make different applications so only fill out the relevant sections.', + }, + line4: { + part1: `Apply to serve the ${isDivorce ? 'divorce' : 'civil partnership'} papers another way`, + link: config.get('govukUrls.d11Form'), + }, + subHeading4: 'What happens next', + line5: `Your${isJointApplication ? ' joint' : ''} application${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + (!isJointApplication || userCase.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES) + ? ' and Help With Fees reference number' + : '' + } will be checked by court staff. You will receive an email notification by ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day') + )} confirming whether it has been accepted. Check your junk or spam email folder.`, + line6: `Your ${partner} will then be sent a copy of the application. They will be asked to check the information and respond. If they do not respond then you will be told what you can do next to progress the application.`, + line7: `Your ${partner}’s solicitor will be contacted by the court, and asked to confirm they are representing them. They will be sent a copy of the application and asked to respond.`, + line8: `If you want to ‘serve’ (send) the documents to your ${partner} yourself then phone ${telephoneNumber} to request it. Otherwise the court will do it.`, + line9: `If you want the court to serve (send) the application by post instead of by email, then phone ${telephoneNumber}.`, + line10: `The address you have provided for your ${partner} is outside of England and Wales. That means you are responsible for ‘serving’ (sending) the court documents, which notify your ${partner} about ${ + isDivorce ? 'the divorce' : 'ending the civil partnership' + }.`, + line11: `You will receive the documents that you need to send to your ${partner} by email and letter, after the application has been checked.`, subHeading1: - userCase.state === State.AwaitingAmendedApplication + userCase.state === State.AwaitingAmendedApplication || userCase.state === State.AwaitingDocuments ? 'Latest information' : `${userCase.state === State.AwaitingClarification ? 'What you need to do now' : 'Latest update'}`, }); // @TODO translations const cy: typeof en = ( - { isDivorce, partner, userCase }: CommonContent, + { isDivorce, partner, userCase, telephoneNumber, referenceNumber, isJointApplication }: CommonContent, alternativeServiceType: AlternativeServiceType ) => ({ aosAwaitingOrDrafted: { - line1: `Mae eich cais ${ - isDivorce ? 'am ysgariad' : "i ddod â'ch partneriaeth sifil i ben" - } wedi'i gyflwyno a'i wirio gan staff y llys. Mae wedi cael ei ‘gyflwyno’ (ei anfon) at eich ${partner}${ - userCase.applicant2EmailAddress - ? ' drwy e-bost' - : userCase.applicant1KnowsApplicant2Address === YesOrNo.YES - ? " drwy'r post" - : '' - }.`, - line2: `Dylai eich ${partner} ymateb i'r ${ - isDivorce ? 'cais am ysgariad' : "cais i ddod â'ch partner sifil i ben" - } erbyn ${getFormattedDate(userCase.dueDate, SupportedLanguages.Cy)}.`, - line3: - "Byddwch yn cael eich hysbysu drwy e-bost pan fyddant wedi ymateb. Neu cewch wybod beth i’w wneud nesaf os nad ydyn nhw'n ymateb.", + line1: `Bydd staff y llys yn gwirio eich cais ${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES ? 'a’ch cyfeirnod Help i Dalu Ffioedd' : '' + }. Fe gewch neges e-bost erbyn ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day'), + SupportedLanguages.Cy + )} yn cadarnhau p’un a yw wedi’i dderbyn. Gwiriwch eich ffolder ‘junk’ neu ‘spam’.`, + line2: `Yna fe anfonir copi o’r cais at eich ${partner}. Fe ofynnir iddynt wirio’r wybodaeth ac ymateb. Os na fyddant yn ymateb, fe ddywedir wrthych beth allwch ei wneud nesaf i symud y cais yn ei flaen.`, + line3: `Os ydych eisiau ‘cyflwyno’ (anfon) y dogfennau at eich ${partner} eich hun, yna ffoniwch ${telephoneNumber} i ofyn am gael gwneud hynny. Fel arall, bydd y llys yn gwneud hyn ar eich rhan.`, + line4: `Os ydych eisiau i’r llys gyflwyno (anfon) y cais i’w gyflwyno drwy’r post yn hytrach na drwy e-bost, ffoniwch ${telephoneNumber}.`, + line5: `Mae’r cyfeiriad rydych wedi’i ddarparu ar gyfer eich ${partner} y tu allan i Gymru a Lloegr. Mae hynny’n golygu mai chi sy’n gyfrifol am ‘gyflwyno’ (anfon) dogfennau’r llys, sy’n hysbysu’ch ${partner} am yr ysgariad.`, + line6: `Fe gewch y dogfennau y bydd angen i chi eu hanfon at eich ${partner} drwy e-bost a llythyr, ar ôl i’r cais gael ei wirio.`, + line7: `Bydd y llys yn cysylltu â chyfreithiwr eich ${partner} ac yn gofyn iddynt gadarnhau eu bod yn eu cynrychioli. Fe anfonir copi o’r cais atynt ac fe ofynnir iddynt ymateb.`, }, aosDue: { line1: `Dylai eich ${partner} fod wedi ymateb i'ch ${ @@ -484,6 +549,63 @@ const cy: typeof en = ( line1: 'Mae eich cais wedi cyrraedd y llys a bydd yn cael ei gyfeirio at farnwr i ystyried eich cais. Dylech glywed gan\n y llys am benderfyniad y barnwr.', }, + sendDocumentLine1: 'Ni fydd eich cais yn cael ei brosesu hyd nes y byddwch wedi gwneud y canlynol:', + sendDocumentHeading: 'Anfon eich dogfennau i’r llys', + line2: 'Mae angen i chi anfon y dogfennau canlynol i’r llys gan na wnaethoch eu llwytho yn gynharach:', + documents: { + [DocumentType.MARRIAGE_CERTIFICATE]: + userCase.inTheUk === YesOrNo.NO + ? `Eich tystysgrif ${isDivorce ? 'priodas' : 'partneriaeth sifil'} dramor wreiddiol` + : `Eich tystysgrif ${isDivorce ? 'priodas' : 'partneriaeth sifil'} wreiddiol neu gopi ardystiedig ohoni`, + [DocumentType.MARRIAGE_CERTIFICATE_TRANSLATION]: `Cyfieithiad ardystiedig o’ch tystysgrif ${ + isDivorce ? 'priodas' : 'partneriaeth sifil' + } dramor`, + [DocumentType.NAME_CHANGE_EVIDENCE]: + 'Prawf eich bod wedi newid eich enw. Er enghraifft, gweithred newid enw neu ddatganiad statudol.', + }, + documentsByOnlineForm: 'Anfon dogfennau drwy ddefnyddio ein ffurflen ar-lein', + documentsByOnlineFormSteps: { + line1: 'Gallwch anfon lluniau neu sganiau o’ch dogfennau atom trwy ', + line2: 'llwytho gan ddefnyddio ein ffurflen ar-lein.', + line3: + "Gwnewch yn siŵr eich bod yn dilyn y cyfarwyddiadau ar sut i lwytho eich dogfennau'n ofalus neu gellid eu gwrthod, gan arwain at oedi pellach.", + }, + documentsByPost: 'Anfon eich dogfennau drwy’r post', + documentsByPostSteps: { + step1: `Ysgrifennwch eich cyfeirnod ar bob dogfen: ${referenceNumber}`, + step2: 'Postiwch y dogfennau gwreiddiol i:', + }, + documentsByPostMoreDetails: + 'Gwnewch yn siŵr eich bod hefyd yn cynnwys cyfeiriad dychwelyd yn eich ymateb. Bydd unrhyw ddogfennau y byddwch yn eu hanfon, fel tystysgrifau priodas, tystysgrifau geni, pasbortau neu weithred newid enw yn cael eu dychwelyd atoch. Ni fydd y dogfennau eraill yn cael eu dychwelyd.', + subHeading3: `Gwneud cais i gyflwyno papurau’r ${isDivorce ? 'ysgariad' : 'bartneriaeth sifil'} mewn ffordd arall`, + line3: { + p1: `Mae angen i chi wneud cais i gyflwyno papurau’r ${ + isDivorce ? 'ysgariad' : 'bartneriaeth sifil' + } ar eich ${partner} mewn ffordd arall. Y rheswm dros hyn yw oherwydd ni wnaethoch ddarparu eu cyfeiriad e-bost neu gyfeiriad post. Gallwch wneud cais i’w cyflwyno arnynt drwy e-bost yn unig, drwy neges testun neu gyfryngau cymdeithasol.`, + p2: 'Bydd angen i chi lenwi ffurflen bapur D11 a’i hanfon i’r llys. Gallwch ddefnyddio’r ffurflen i wneud ceisiadau gwahanol, felly dim ond yr adrannau perthnasol sydd angen i chi eu llenwi.', + }, + line4: { + part1: `Gwneud cais i gyflwyno papurau’r ${isDivorce ? 'ysgariad' : 'bartneriaeth sifil'} mewn ffordd arall`, + link: config.get('govukUrls.d11Form'), + }, + subHeading4: 'Beth fydd yn digwydd nesaf', + line5: `Bydd staff y llys yn gwirio eich cais ${isJointApplication ? ' ar y cyd' : ''}${ + userCase.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + (!isJointApplication || userCase.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES) + ? ' a’ch cyfeirnod Help i Dalu Ffioedd' + : '' + }. Fe gewch neges e-bost erbyn ${getFormattedDate( + dayjs(userCase.dateSubmitted).add(config.get('dates.applicationSubmittedOffsetDays'), 'day'), + SupportedLanguages.Cy + )} yn cadarnhau p’un a yw wedi’i dderbyn. Gwiriwch eich ffolder ‘junk’ neu ‘spam’.`, + line6: `Yna fe anfonir copi o’r cais at eich ${partner}. Os na fyddant yn ymateb, fe ddywedir wrthych beth allwch ei wneud nesaf i symud y cais yn ei flaen.`, + line7: `Bydd y llys yn cysylltu â chyfreithiwr eich ${partner} ac yn gofyn iddo gadarnhau ei fod yn cynrychioli eich ${partner}. Fe anfonir copi o’r cais ato ac fe ofynnir iddo ymateb.`, + line8: `Os ydych eisiau ‘cyflwyno’ (anfon) y dogfennau ar eich ${partner} eich hun, yna ffoniwch ${telephoneNumber}. Fel arall, bydd y llys yn gwneud hyn ar eich rhan.`, + line9: `Os ydych eisiau i’r llys gyflwyno (anfon) y cais drwy’r post yn hytrach na drwy e-bost, ffoniwch ${telephoneNumber}.`, + line10: `Mae’r cyfeiriad rydych wedi’i ddarparu ar gyfer eich ${partner} y tu allan i Gymru a Lloegr. Mae hynny’n golygu eich bod chi’n gyfrifol am ‘gyflwyno’ (anfon) dogfennau’r llys, sydd yn hysbysu eich ${partner} am ${ + isDivorce ? 'yr ysgariad' : 'ddiweddu’r bartneriaeth sifil' + }.`, + line11: `Fe gewch y dogfennau y bydd angen i chi eu hanfon at eich ${partner} drwy e-bost a drwy’r post, ar ôl i’r cais gael ei wirio.`, }); const languages = { @@ -517,7 +639,12 @@ export const generateContent: TranslationFn = content => { const isSwitchToSoleCoApp = userCase.switchedToSoleCo === YesOrNo.YES; const hasApplicant1AppliedForFinalOrderFirst = userCase.applicant1AppliedForFinalOrderFirst === YesOrNo.YES; const isFinalOrderCompleteState = userCase.state === State.FinalOrderComplete; - + const cannotUploadDocuments = new Set([ + ...(userCase.applicant1CannotUploadDocuments || []), + ...(userCase.applicant2CannotUploadDocuments || []), + ]); + const isRespondentOverseas = !isCountryUk(userCase.applicant2AddressCountry); + const isRespondentRepresented = userCase.applicant1IsApplicant2Represented === Applicant2Represented.YES; return { ...languages[language](content, alternativeServiceType), displayState, @@ -530,5 +657,8 @@ export const generateContent: TranslationFn = content => { isSwitchToSoleCoApp, hasApplicant1AppliedForFinalOrderFirst, isFinalOrderCompleteState, + cannotUploadDocuments, + isRespondentOverseas, + isRespondentRepresented, }; }; diff --git a/src/main/steps/applicant1/hub-page/sole/latest-update-content/aos-awaiting-or-drafted.njk b/src/main/steps/applicant1/hub-page/sole/latest-update-content/aos-awaiting-or-drafted.njk index a9753bfc32..294dd29e85 100644 --- a/src/main/steps/applicant1/hub-page/sole/latest-update-content/aos-awaiting-or-drafted.njk +++ b/src/main/steps/applicant1/hub-page/sole/latest-update-content/aos-awaiting-or-drafted.njk @@ -1,3 +1,16 @@ -{% for property, line in aosAwaitingOrDrafted %} -

{{ line }}

-{% endfor %} +

{{ aosAwaitingOrDrafted.line1 }}

+{% if isRespondentOverseas %} + {% if isRespondentRepresented %} +

{{ aosAwaitingOrDrafted.line7 }}

+ {% else %} +

{{ aosAwaitingOrDrafted.line2 }}

+ {% endif %} +

{{ aosAwaitingOrDrafted.line5 }}

+

{{ aosAwaitingOrDrafted.line6 }}

+{% elif isRespondentRepresented %} +

{{ aosAwaitingOrDrafted.line7 }}

+{% else %} +

{{ aosAwaitingOrDrafted.line2 }}

+

{{ aosAwaitingOrDrafted.line3 }}

+

{{ aosAwaitingOrDrafted.line4 }}

+{% endif %} diff --git a/src/main/steps/applicant1/hub-page/sole/latest-update-content/awaiting-documents.njk b/src/main/steps/applicant1/hub-page/sole/latest-update-content/awaiting-documents.njk new file mode 100644 index 0000000000..451d28454b --- /dev/null +++ b/src/main/steps/applicant1/hub-page/sole/latest-update-content/awaiting-documents.njk @@ -0,0 +1,62 @@ +{% from "common/macros/service-address.njk" import serviceAddressMacro %} + {% if userCase.applicant1CannotUpload or userCase.applicant2CannotUpload or userCase.iWantToHavePapersServedAnotherWay %} +

{{ sendDocumentLine1 }}

+ {% if userCase.applicant1CannotUpload or userCase.applicant2CannotUpload %} +

{{ sendDocumentHeading }}

+

{{ line2 }}

+
    + {% for document in cannotUploadDocuments %} +
  • {{ documents[document] }}
  • + {% endfor %} +
+ + {% set sendingDocumentsByOnlineForm %} +

{{ documentsByOnlineFormSteps.line1 }} {{ documentsByOnlineFormSteps.line2}}

+

{{ documentsByOnlineFormSteps.line3 }}

+ {% endset %} + {{ govukDetails({ + summaryText: documentsByOnlineForm, + html: sendingDocumentsByOnlineForm + }) }} + + {% set sendingDocumentsByPost %} +
    + {% for property, step in documentsByPostSteps %} +
  1. {{ step }}
  2. + {% endfor %} +
+ {{ serviceAddressMacro(serviceAddress) }} +

{{ documentsByPostMoreDetails }}

+ {% endset %} + {{ govukDetails({ + summaryText: documentsByPost, + html: sendingDocumentsByPost + }) }} + {% endif %} + {% if userCase.iWantToHavePapersServedAnotherWay %} +

{{ subHeading3 }}

+

{{ line3.p1 }}

+

{{ line3.p2 }}

+

{{ line4.part1 }}

+ {% endif %} + {% else %} +

{{ subHeading4 }}

+ {% if not userCase.iWantToHavePapersServedAnotherWay %} +

{{ line5 }}

+ {% endif %} + {% if not isJointApplication %} + {% if hasASolicitorContactForPartner %} +

{{ line7 }}

+ {% elif not isRespondentRepresented %} +

{{ line6 }}

+ {% endif %} + {% if applicationServedAnotherWay %} +

{{ line8 }}

+

{{ line9 }}

+ {% endif %} + {% if isRespondentOverseas %} +

{{ line10 }}

+

{{ line11 }}

+ {% endif %} + {% endif %} + {% endif %} diff --git a/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.test.ts b/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.test.ts index d795ade877..226fa9ee6b 100644 --- a/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.test.ts +++ b/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.test.ts @@ -344,4 +344,26 @@ describe('SoleTemplateSelector test', () => { const soleTemplate = getSoleHubTemplate(theState, userCase, false, false); expect(soleTemplate).toBe(HubTemplate.PendingHearingOutcome); }); + + test('should show /awaiting-documents.njk for state AwaitingDocuments', () => { + const theState = displayState.at(State.AwaitingDocuments); + const soleTemplate = getSoleHubTemplate(theState, userCase, false, false); + expect(soleTemplate).toBe(HubTemplate.AwaitingDocuments); + }); + + test('should show /awaiting-documents.njk for state AwaitingHWFDecision and reason is "cannot upload documents"', () => { + const userCaseWithApplicant1CannotUploadDocuments = { + ...userCase, + applicant1CannotUpload: Checkbox.Checked, + }; + const theState = displayState.at(State.AwaitingHWFDecision); + const soleTemplate = getSoleHubTemplate(theState, userCaseWithApplicant1CannotUploadDocuments, false, false); + expect(soleTemplate).toBe(HubTemplate.AwaitingDocuments); + }); + + test('should show /aos-awaiting-or-drafted.njk for state AwaitingHWFDecision', () => { + const theState = displayState.at(State.AwaitingHWFDecision); + const soleTemplate = getSoleHubTemplate(theState, userCase, false, false); + expect(soleTemplate).toBe(HubTemplate.AosAwaitingOrDrafted); + }); }); diff --git a/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.ts b/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.ts index 6f337af03b..316b18fc5d 100644 --- a/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.ts +++ b/src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.ts @@ -1,6 +1,6 @@ import dayjs from 'dayjs'; -import { CaseWithId } from '../../../../app/case/case'; +import { CaseWithId, Checkbox } from '../../../../app/case/case'; import { ServiceApplicationRefusalReason, State, YesOrNo } from '../../../../app/case/definition'; import { HubTemplate } from '../../../common/hubTemplates'; import { StateSequence } from '../../../state-sequence'; @@ -100,6 +100,12 @@ export const getSoleHubTemplate = ( case State.PendingHearingOutcome: case State.PendingHearingDate: return HubTemplate.PendingHearingOutcome; + case State.AwaitingHWFDecision: + return userCase.applicant1CannotUpload === Checkbox.Checked + ? HubTemplate.AwaitingDocuments + : HubTemplate.AosAwaitingOrDrafted; + case State.AwaitingDocuments: + return HubTemplate.AwaitingDocuments; default: { if (displayState.isAfter('AosDrafted') && displayState.isBefore('Holding')) { return HubTemplate.AoSDue; diff --git a/src/main/steps/applicant1/hub-page/template.njk b/src/main/steps/applicant1/hub-page/template.njk index e3ad29c269..46ffb3e2df 100644 --- a/src/main/steps/applicant1/hub-page/template.njk +++ b/src/main/steps/applicant1/hub-page/template.njk @@ -13,10 +13,9 @@ {{ referenceNumber }}
-
-
+
- {% include "./progress-bar.njk" %} + {% include "../../common/progress-bar.njk" %}

{{ subHeading1 }}

@@ -29,11 +28,13 @@ {% include "./sole/hub.njk" %} {% endblock %} {% endif %} + {% if displayState.isAfter('AwaitingDocuments') or displayState.isAtOrAfter('AwaitingHWFDecision') %}

{{ subHeading2 }}

{{ line1 }}

+ {% endif %}
diff --git a/src/main/steps/applicant1Sequence.ts b/src/main/steps/applicant1Sequence.ts index f0f54b1271..c8a8d8f857 100644 --- a/src/main/steps/applicant1Sequence.ts +++ b/src/main/steps/applicant1Sequence.ts @@ -426,7 +426,11 @@ export const applicant1PreSubmissionSequence: Step[] = [ }, { url: CONFIRM_JOINT_APPLICATION, - getNextStep: () => PAY_AND_SUBMIT, + getNextStep: data => + data.applicant1AlreadyAppliedForHelpPaying === YesOrNo.YES && + data.applicant2AlreadyAppliedForHelpPaying === YesOrNo.YES + ? JOINT_APPLICATION_SUBMITTED + : PAY_AND_SUBMIT, }, { url: APPLICATION_ENDED, diff --git a/src/main/steps/applicant2/app-represented/content.ts b/src/main/steps/applicant2/app-represented/content.ts index d927bc6ba0..793c4aacc8 100644 --- a/src/main/steps/applicant2/app-represented/content.ts +++ b/src/main/steps/applicant2/app-represented/content.ts @@ -87,7 +87,7 @@ const cy: typeof en = ( link: config.get('govukUrls.domesticAbuse'), }, feedback: "Helpwch ni i wella'r gwasanaeth hwn", - feedbackLine1: 'Complete this short, 5-minute survey to help improve our services for you and others.', + feedbackLine1: 'Cwblhewch yr arolwg 5 munud hwn i helpu i wella ein gwasanaethau i chi ac eraill.', feedbackLine2: { part1: 'Mae hwn yn wasanaeth newydd.', link: feedbackLink, diff --git a/src/main/steps/applicant2/app-represented/progress-bar.njk b/src/main/steps/applicant2/app-represented/progress-bar.njk deleted file mode 100644 index b5a44fc3c5..0000000000 --- a/src/main/steps/applicant2/app-represented/progress-bar.njk +++ /dev/null @@ -1,74 +0,0 @@ -{% macro textWithVisuallyHiddenSpan(text, isComplete) %} - {{text}} {{'' if isComplete else 'not '}}completed -{% endmacro %} - -{% if isJointApplication %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAtOrAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.state() == 'FinalOrderComplete') - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% else %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(response, displayState.isAfter('IssuedToBailiff')) - }, - complete: displayState.isAfter('IssuedToBailiff'), - active: displayState.isAtOrAfter('AwaitingAos') and displayState.isBefore('Holding'), - interval: weeksToResponse - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.isAtOrAfter('FinalOrderPending')) - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% endif %} - -
-
-
    - {% for item in items %} -
  1. - - {{ item.label.html | safe if item.label.html else item.label.text }} - {% if item.interval %} - - {{ item.interval }} - - {% endif %} -
  2. - {% endfor %} -
-
-
diff --git a/src/main/steps/applicant2/app-represented/template.njk b/src/main/steps/applicant2/app-represented/template.njk index a7792e220e..8f3f8d0b0b 100644 --- a/src/main/steps/applicant2/app-represented/template.njk +++ b/src/main/steps/applicant2/app-represented/template.njk @@ -18,7 +18,7 @@

{{ appRepresentedText }}

- {% include "./progress-bar.njk" %} + {% include "../../common/progress-bar.njk" %}

{{ subHeading6 }}

{{ line16.part1 }}{{ line16.linkText }}

{{ webChat }}

diff --git a/src/main/steps/common/common.content.ts b/src/main/steps/common/common.content.ts index cc7b36ab55..66467aab54 100644 --- a/src/main/steps/common/common.content.ts +++ b/src/main/steps/common/common.content.ts @@ -89,7 +89,7 @@ export const en = { telephoneNumber: '0300 303 0642', openingTimesHeading: 'Opening times (webchat and telephone)', openingTimes: 'Monday to Friday, 10am to 6pm', - closingTimes: 'Closed on Saturdays, Sundays and bank holidays', + closingTimes: 'Closed on bank holidays', cookiesBanner: { cookiesHeading: 'Cookies on', cookiesLine1: 'We use some essential cookies to make this service work.', @@ -273,6 +273,13 @@ const cy: typeof en = { part3: ' unrhyw adeg.', }, }, + serviceAddress: { + line1: 'Canolfan Gwasanaethau Llysoedd a Thribiwnlysoedd', + line2: 'Gwasanaeth Ysgariadau a Diddymiadau GLlTEF', + poBox: 'Blwch Post 13226', + town: 'Harlow', + postcode: 'CM20 9UG', + }, changeCookiesHeading: 'Newid eich gosodiadau cwcis', contactEmail: 'contactdivorce@justice.gov.uk', contactWebForm: 'https://contact-us-about-a-divorce-application-cy.form.service.justice.gov.uk/', diff --git a/src/main/steps/common/hmcts-progress-bar/macro.njk b/src/main/steps/common/hmcts-progress-bar/macro.njk new file mode 100644 index 0000000000..87b8a21e25 --- /dev/null +++ b/src/main/steps/common/hmcts-progress-bar/macro.njk @@ -0,0 +1,3 @@ +{% macro hmctsProgressBar(params) %} + {%- include "./template.njk" -%} +{% endmacro %} \ No newline at end of file diff --git a/src/main/steps/common/hmcts-progress-bar/template.njk b/src/main/steps/common/hmcts-progress-bar/template.njk new file mode 100644 index 0000000000..596e611f41 --- /dev/null +++ b/src/main/steps/common/hmcts-progress-bar/template.njk @@ -0,0 +1,10 @@ +
+
    + {% for item in params.items %} +
  1. + + {{ item.label.html | safe if item.label.html else item.label.text }} +
  2. + {% endfor %} +
+
diff --git a/src/main/steps/common/hubTemplates.ts b/src/main/steps/common/hubTemplates.ts index 2ab1126b76..b7cd4f066f 100644 --- a/src/main/steps/common/hubTemplates.ts +++ b/src/main/steps/common/hubTemplates.ts @@ -25,4 +25,5 @@ export const enum HubTemplate { Holding = '/holding.njk', IntendToSwitchToSoleFinalOrder = '/intend-to-switch-to-sole-final-order.njk', ServiceApplicationRejected = '/service-application-rejected.njk', + AwaitingDocuments = '/awaiting-documents.njk', } diff --git a/src/main/steps/applicant1/hub-page/progress-bar.njk b/src/main/steps/common/progress-bar.njk similarity index 70% rename from src/main/steps/applicant1/hub-page/progress-bar.njk rename to src/main/steps/common/progress-bar.njk index 69e9c480c7..7259cf0734 100644 --- a/src/main/steps/applicant1/hub-page/progress-bar.njk +++ b/src/main/steps/common/progress-bar.njk @@ -1,4 +1,4 @@ -{% from "components/hmcts-progress-bar/macro.njk" import hmctsProgressBar %} +{% from "./hmcts-progress-bar/macro.njk" import hmctsProgressBar %} {% macro textWithVisuallyHiddenSpan(text, isComplete) %} {{text}} {{'' if isComplete else 'not '}}completed @@ -7,11 +7,17 @@ {% if isJointApplication %} {% set items = [{ label: { - html: textWithVisuallyHiddenSpan(submitted, true) + html: textWithVisuallyHiddenSpan(submitted, displayState.isAtOrAfter('Submitted')) }, - complete: true, - active: false + complete: displayState.isAtOrAfter('Submitted') or displayState.at('AwaitingHWFDecision'), + active: displayState.at('AwaitingDocuments') and not (displayState.isAtOrAfter('Submitted') or displayState.at('AwaitingHWFDecision')) }, { + label: { + html: textWithVisuallyHiddenSpan(courtChecks, displayState.isAfter('Submitted')) + }, + complete: displayState.isAtOrAfter('Holding'), + active: displayState.isBefore('Holding') + }, { label: { html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) }, @@ -27,10 +33,16 @@ {% else %} {% set items = [{ label: { - html: textWithVisuallyHiddenSpan(submitted, true) + html: textWithVisuallyHiddenSpan(submitted, displayState.isAtOrAfter('Submitted')) + }, + complete: displayState.isAtOrAfter('Submitted') or displayState.at('AwaitingHWFDecision'), + active: displayState.at('AwaitingDocuments') and not (displayState.isAtOrAfter('Submitted') or displayState.at('AwaitingHWFDecision')) + }, { + label: { + html: textWithVisuallyHiddenSpan(courtChecks, displayState.isBefore('Submitted')) }, - complete: true, - active: false + complete: displayState.isAtOrAfter('AwaitingAos'), + active: displayState.isBefore('AwaitingAos') }, { label: { html: textWithVisuallyHiddenSpan(response, displayState.isAfter('IssuedToBailiff')) diff --git a/src/main/steps/respondent/app-represented/content.ts b/src/main/steps/respondent/app-represented/content.ts index d927bc6ba0..793c4aacc8 100644 --- a/src/main/steps/respondent/app-represented/content.ts +++ b/src/main/steps/respondent/app-represented/content.ts @@ -87,7 +87,7 @@ const cy: typeof en = ( link: config.get('govukUrls.domesticAbuse'), }, feedback: "Helpwch ni i wella'r gwasanaeth hwn", - feedbackLine1: 'Complete this short, 5-minute survey to help improve our services for you and others.', + feedbackLine1: 'Cwblhewch yr arolwg 5 munud hwn i helpu i wella ein gwasanaethau i chi ac eraill.', feedbackLine2: { part1: 'Mae hwn yn wasanaeth newydd.', link: feedbackLink, diff --git a/src/main/steps/respondent/app-represented/progress-bar.njk b/src/main/steps/respondent/app-represented/progress-bar.njk deleted file mode 100644 index b5a44fc3c5..0000000000 --- a/src/main/steps/respondent/app-represented/progress-bar.njk +++ /dev/null @@ -1,74 +0,0 @@ -{% macro textWithVisuallyHiddenSpan(text, isComplete) %} - {{text}} {{'' if isComplete else 'not '}}completed -{% endmacro %} - -{% if isJointApplication %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAtOrAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.state() == 'FinalOrderComplete') - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% else %} - {% set items = [{ - label: { - html: textWithVisuallyHiddenSpan(submitted, true) - }, - complete: true, - active: false - }, { - label: { - html: textWithVisuallyHiddenSpan(response, displayState.isAfter('IssuedToBailiff')) - }, - complete: displayState.isAfter('IssuedToBailiff'), - active: displayState.isAtOrAfter('AwaitingAos') and displayState.isBefore('Holding'), - interval: weeksToResponse - }, { - label: { - html: textWithVisuallyHiddenSpan(conditionalOrder, displayState.isAtOrAfter('AwaitingLegalAdvisorReferral')) - }, - complete: displayState.isAfter('ConditionalOrderPronounced'), - active: displayState.isAtOrAfter('AwaitingConditionalOrder') and displayState.isBefore('ConditionalOrderPronounced'), - interval: weeksToConditionalOrder - }, { - label: { - html: textWithVisuallyHiddenSpan(finalOrder, displayState.isAtOrAfter('FinalOrderPending')) - }, - complete: displayState.state() == 'FinalOrderComplete', - active: displayState.isAtOrAfter('AwaitingFinalOrder') and displayState.isBefore('FinalOrderComplete'), - interval: weeksToFinalOrder - }] %} -{% endif %} - -
-
-
    - {% for item in items %} -
  1. - - {{ item.label.html | safe if item.label.html else item.label.text }} - {% if item.interval %} - - {{ item.interval }} - - {% endif %} -
  2. - {% endfor %} -
-
-
diff --git a/src/main/steps/respondent/app-represented/template.njk b/src/main/steps/respondent/app-represented/template.njk index a7792e220e..8f3f8d0b0b 100644 --- a/src/main/steps/respondent/app-represented/template.njk +++ b/src/main/steps/respondent/app-represented/template.njk @@ -18,7 +18,7 @@

{{ appRepresentedText }}

- {% include "./progress-bar.njk" %} + {% include "../../common/progress-bar.njk" %}

{{ subHeading6 }}

{{ line16.part1 }}{{ line16.linkText }}

{{ webChat }}

diff --git a/src/test/functional/features/applicant1-sole.feature b/src/test/functional/features/applicant1-sole.feature index 218c9ed8d3..1c4f4ece21 100644 --- a/src/test/functional/features/applicant1-sole.feature +++ b/src/test/functional/features/applicant1-sole.feature @@ -164,7 +164,7 @@ Feature: Applicant 1 sole application When I click "Continue to payment" Then the page should include "Pay your divorce fee" Given I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" @nightly @@ -452,4 +452,4 @@ Feature: Applicant 1 sole application And I select "I believe that the facts stated in this application are true" When I click "Submit application" - Then the page should include "Application submitted" + Then the page should include "Application saved" diff --git a/src/test/functional/features/applicant2.feature b/src/test/functional/features/applicant2.feature index d65ff82fa4..4362568c6f 100644 --- a/src/test/functional/features/applicant2.feature +++ b/src/test/functional/features/applicant2.feature @@ -110,10 +110,11 @@ Feature: Applicant 2 When I click "Continue to payment" Then the page URL should be "/pay-and-submit" When I pay and submit the joint application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given I click "Sign out" And I login with applicant "2" - Then the page should include "Application submitted" + Then the page URL should be "/hub-page" + And the page should include "Send your documents" @nightly Scenario: They fill out an unhappy path applicant 2 journey with help with fees diff --git a/src/test/functional/features/joint-hub-page.feature b/src/test/functional/features/joint-hub-page.feature index 4117d0215d..9925ae6df7 100644 --- a/src/test/functional/features/joint-hub-page.feature +++ b/src/test/functional/features/joint-hub-page.feature @@ -12,7 +12,7 @@ Feature: Joint hub page Scenario: Joint hub applicant 1 and applicant 2 pages Given I set the case state to "Holding" And I go to "/" - Then the page should include "Your application for divorce has been submitted and checked by court staff." + Then the page should include "Your joint application will be checked by court staff" When I click "Confirm receipt" Then the page should include "You have confirmed receipt of the divorce application" And the page should include "The next step is to apply for a 'conditional order'." @@ -20,7 +20,7 @@ Feature: Joint hub page Given I click "Sign out" And I login with applicant "1" - Then the page should include "Your application for divorce has been submitted and checked by court staff." + Then the page should include "Your joint application will be checked by court staff." When I click "Confirm receipt" Then the page should include "You have confirmed receipt of the divorce application" And the page should include "The next step is to apply for a 'conditional order'." diff --git a/src/test/functional/features/respondent.feature b/src/test/functional/features/respondent.feature index c9bbefd9a6..6cda4a844f 100644 --- a/src/test/functional/features/respondent.feature +++ b/src/test/functional/features/respondent.feature @@ -8,7 +8,7 @@ Feature: Respondent And I click "I believe that the facts stated in this application are true" When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given a case worker issues the application Scenario: They fill out a happy path respondent journey diff --git a/src/test/functional/features/sole-conditional-order.feature b/src/test/functional/features/sole-conditional-order.feature index 8770704eb5..0a55d7de56 100644 --- a/src/test/functional/features/sole-conditional-order.feature +++ b/src/test/functional/features/sole-conditional-order.feature @@ -9,7 +9,7 @@ Feature: Sole conditional order When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given a case worker issues the application And I enter my valid case reference and valid access code diff --git a/src/test/functional/features/sole-final-order.feature b/src/test/functional/features/sole-final-order.feature index 4d4e5f1154..1dc5a44a04 100644 --- a/src/test/functional/features/sole-final-order.feature +++ b/src/test/functional/features/sole-final-order.feature @@ -10,7 +10,7 @@ Feature: Sole final order And I click "I believe that the facts stated in this application are true" When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given a case worker issues the application And I enter my valid case reference and valid access code And I set the case state to "AwaitingFinalOrder" @@ -35,7 +35,7 @@ Feature: Sole final order And I click "I believe that the facts stated in this application are true" When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given a case worker issues the application And I enter my valid case reference and valid access code And I set the case state to "AwaitingFinalOrder" @@ -64,7 +64,7 @@ Feature: Sole final order And I click "I believe that the facts stated in this application are true" When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given a case worker issues the application And I enter my valid case reference and valid access code And I set the case state to "AwaitingFinalOrder" @@ -102,7 +102,7 @@ Feature: Sole final order And I click "I believe that the facts stated in this application are true" When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" Given a case worker issues the application And I enter my valid case reference and valid access code And I set the case state to "AwaitingFinalOrder" diff --git a/src/test/functional/features/update-contact-details.feature b/src/test/functional/features/update-contact-details.feature index c45ca04218..34e174cce3 100644 --- a/src/test/functional/features/update-contact-details.feature +++ b/src/test/functional/features/update-contact-details.feature @@ -8,7 +8,7 @@ Feature: Update contact details And I click "I believe that the facts stated in this application are true" When I click "Continue to payment" And I pay and submit the application - Then the page should include "Application submitted" + Then the page should include "Application saved" When a case worker issues the application And I enter my valid case reference and valid access code Then the page URL should be "/respondent/hub-page"