Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
569d5bf
NFDIV-5309 Don't show serviceApplicationRejected content in AwaitingAos
BWeeks-JusticeGovUK Mar 25, 2026
da43089
Merge branch 'master' into NFDIV-5309
BWeeks-JusticeGovUK Mar 27, 2026
2a174ca
Merge branch 'master' into NFDIV-5309
BWeeks-JusticeGovUK Mar 27, 2026
9c4adc3
NFDIV-5309 Remove bailiffServiceUnsuccessful hub page and tidy up
BWeeks-JusticeGovUK Mar 31, 2026
d75aa20
NFDIV-5209 Add bailiff service certificate to downloads
BWeeks-JusticeGovUK Mar 31, 2026
9b876a8
NFDIV-5309 Clean up unit test for removed hub page
BWeeks-JusticeGovUK Apr 7, 2026
195c511
NFDIV-5309 Add missing translations
BWeeks-JusticeGovUK Apr 7, 2026
ff446b7
Merge branch 'master' into NFDIV-5309
BWeeks-JusticeGovUK Apr 7, 2026
939b1e8
Merge branch 'NFDIV-5309' of https://github.com/hmcts/nfdiv-frontend …
BWeeks-JusticeGovUK Apr 7, 2026
6e23f36
NFDIV-5309 Fix unit tests
BWeeks-JusticeGovUK Apr 7, 2026
5c21c90
NFDIV-5309 Update unit tests
BWeeks-JusticeGovUK Apr 7, 2026
461ecc7
NFDIV-5309 Add bailiff service rejection doc link & refactor Object.v…
BWeeks-JusticeGovUK Apr 16, 2026
bb085a4
Merge branch 'master' into NFDIV-5309
BWeeks-JusticeGovUK Apr 16, 2026
cf7a460
NFDIV-5309 Refactor downloadLogic to allow for docs restricted to app1
BWeeks-JusticeGovUK Apr 17, 2026
53d5c14
Merge branch 'master' into NFDIV-5309
BWeeks-JusticeGovUK Apr 17, 2026
e088a64
NFDIV-5309 Add welsh translation
BWeeks-JusticeGovUK Apr 17, 2026
240e1ed
Merge branch 'NFDIV-5309' of https://github.com/hmcts/nfdiv-frontend …
BWeeks-JusticeGovUK Apr 17, 2026
3e99f2b
Apply suggestion from @adamg-hmcts
BWeeks-JusticeGovUK Apr 17, 2026
a7af595
NFDIV-5309 Refactor successful service docs to bothApplicants
BWeeks-JusticeGovUK Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 60 additions & 16 deletions src/main/steps/applicant1/downloads/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@ const en = ({ isDivorce, userCase, serviceApplicationType, generalApplicationTyp
link: '/downloads/certificate-of-service',
text: "View your 'certificate of service' (PDF)",
},
bailiffServiceCertificateDownload: {
downloadReference: 'Bailiff-certificate',
link: '/downloads/bailiff-unsuccessful-certificate-of-service',
text: "View the 'bailiff service certificate' (PDF)",
},
respondentAnswersDownload: {
reference: 'Respondent-Answers',
link: '/downloads/respondent-answers',
text: `View the response to the ${
isDivorce ? 'divorce application' : 'application to end your civil partnership'
} (PDF)`,
},
bailiffServiceRefusedDownload: {
downloadReference: 'bailiff-service-refused',
link: '/downloads/bailiff-service-refused',
text: 'View the court order refusing your application for bailiff service (PDF)',
},
deemedOrDispensedRefusedDownload: {
reference:
userCase.alternativeServiceOutcomes?.[0].value.alternativeServiceType === AlternativeServiceType.DISPENSED
Expand Down Expand Up @@ -130,13 +140,23 @@ const cy: typeof en = ({ isDivorce, userCase, serviceApplicationType, generalApp
certificateOfServiceDownload: {
reference: 'Certificate-of-Service',
link: '/downloads/certificate-of-service',
text: "View your 'certificate of service' (PDF)",
text: 'Gweld eich ‘tystysgrif cyflwyno’ (PDF)',
},
bailiffServiceCertificateDownload: {
downloadReference: 'Bailiff-certificate',
link: '/downloads/bailiff-unsuccessful-certificate-of-service',
text: "Gweld y 'dystysgrif a gyflwynir gan feili' (PDF)",
},
respondentAnswersDownload: {
reference: 'Respondent-Answers',
link: '/downloads/respondent-answers',
text: `Gweld yr ymateb i'r cais ${isDivorce ? 'am ysgariad' : 'i ddod â’ch partneriaeth sifil i ben'} (PDF)`,
},
bailiffServiceRefusedDownload: {
downloadReference: 'bailiff-service-refused',
link: '/downloads/bailiff-service-refused',
text: 'Gweld y gorchymyn llys yn gwrthod eich cais am wasanaeth beili (PDF)',
},
deemedOrDispensedRefusedDownload: {
reference:
userCase.alternativeServiceOutcomes?.[0].value.alternativeServiceType === AlternativeServiceType.DISPENSED
Expand Down Expand Up @@ -224,6 +244,11 @@ const languages = {
const getDownloadLogic: TranslationFn = content => {
const { userCase } = content;

const bailiffService = userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
alternativeServiceOutcome.value.alternativeServiceType === AlternativeServiceType.BAILIFF
);

const deemedOrDispensedService = userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
alternativeServiceOutcome.value.alternativeServiceType === AlternativeServiceType.DEEMED ||
Expand All @@ -248,22 +273,13 @@ const getDownloadLogic: TranslationFn = content => {

const isAwaitingAmendedApplicationState = userCase.state === State.AwaitingAmendedApplication;

return {
hasDivorceOrDissolutionApplication: !!findDocument(userCase, DocumentType.APPLICATION),
const applicant1Only = {
app1OnlineServiceAppInProgress:
content.hasServiceApplicationInProgress && content.serviceApplicationSubmittedOnline && !content.isApplicant2,
app1OnlineGeneralApp:
content.generalApplicationDate && content.generalApplicationSubmittedOnline && !content.isApplicant2,
isAosSubmitted:
userCase.dateAosSubmitted &&
(userCase.documentsUploaded?.find(doc => doc.value.documentType === DocumentType.RESPONDENT_ANSWERS) ||
userCase.documentsGenerated?.find(doc => doc.value.documentType === DocumentType.RESPONDENT_ANSWERS)),
hasCertificateOfService: userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome => alternativeServiceOutcome.value.successfulServedByBailiff === YesOrNo.YES
),
hasCertificateOfDeemedOrDispensedServiceGranted: userCase.alternativeServiceOutcomes?.find(
content.hasServiceApplicationInProgress && content.serviceApplicationSubmittedOnline,
app1OnlineGeneralApp: content.generalApplicationDate && content.generalApplicationSubmittedOnline,
hasCertificateOfBailiffServiceRefused: userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
deemedOrDispensedService && alternativeServiceOutcome.value.serviceApplicationGranted === YesOrNo.YES
bailiffService && alternativeServiceOutcome.value.serviceApplicationGranted === YesOrNo.NO && hasRefusalOrder
),
Comment thread
BWeeks-JusticeGovUK marked this conversation as resolved.
hasCertificateOfDeemedOrDispensedServiceRefused: userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
Expand All @@ -272,6 +288,29 @@ const getDownloadLogic: TranslationFn = content => {
alternativeServiceOutcome.value.refusalReason === 'refusalOrderToApplicant' &&
hasRefusalOrder
),
hasBailiffServiceCertificate: userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
bailiffService &&
alternativeServiceOutcome.value.successfulServedByBailiff === YesOrNo.NO &&
alternativeServiceOutcome.value.certificateOfServiceDocument?.documentType ===
DocumentType.CERTIFICATE_OF_SERVICE
),
};

const bothApplicants = {
hasCertificateOfService: userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
bailiffService && alternativeServiceOutcome.value.successfulServedByBailiff === YesOrNo.YES
),
hasCertificateOfDeemedOrDispensedServiceGranted: userCase.alternativeServiceOutcomes?.find(
alternativeServiceOutcome =>
deemedOrDispensedService && alternativeServiceOutcome.value.serviceApplicationGranted === YesOrNo.YES
),
hasDivorceOrDissolutionApplication: !!findDocument(userCase, DocumentType.APPLICATION),
isAosSubmitted:
userCase.dateAosSubmitted &&
(userCase.documentsUploaded?.find(doc => doc.value.documentType === DocumentType.RESPONDENT_ANSWERS) ||
userCase.documentsGenerated?.find(doc => doc.value.documentType === DocumentType.RESPONDENT_ANSWERS)),
hasCertificateOfEntitlement: content.userCase.coCertificateOfEntitlementDocument,
hasConditionalOrderGranted: content.userCase.coConditionalOrderGrantedDocument,
hasConditionalOrderAnswersAndAccess:
Expand All @@ -292,6 +331,11 @@ const getDownloadLogic: TranslationFn = content => {
doc => doc.value.documentType === DocumentType.FINAL_ORDER_APPLICATION
),
};

return {
...(!content.isApplicant2 && applicant1Only),
...bothApplicants,
};
};

export const generateContent: TranslationFn = content => {
Expand All @@ -303,5 +347,5 @@ export const generateContent: TranslationFn = content => {

export const areDownloadsAvailable = (content: CommonContent): boolean => {
const downloadLogic = getDownloadLogic(content);
return Object.values(downloadLogic).some(value => value === true);
return Object.values(downloadLogic).some(value => !!value);
};
10 changes: 10 additions & 0 deletions src/main/steps/applicant1/downloads/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
download={{certificateOfServiceDownload.reference}}>{{certificateOfServiceDownload.text}}</a></p>
{% endif %}

{% if hasBailiffServiceCertificate %}
<p class="govuk-body"><a class="govuk-link" href={{bailiffServiceCertificateDownload.link}}
download={{certificateOfServiceDownload.reference}}>{{bailiffServiceCertificateDownload.text}}</a></p>
{% endif %}

{% if hasCertificateOfBailiffServiceRefused %}
<p class="govuk-body"><a class="govuk-link" href={{bailiffServiceRefusedDownload.link}}
download={{bailiffServiceRefusedDownload.reference}}>{{bailiffServiceRefusedDownload.text}}</a></p>
{% endif %}

{% if hasCertificateOfDeemedOrDispensedServiceGranted %}
<p class="govuk-body"><a class="govuk-link" href={{deemedOrDispensedDownload.link}}
download={{deemedOrDispensedDownload.reference}}>{{deemedOrDispensedDownload.text}}</a></p>
Expand Down
25 changes: 0 additions & 25 deletions src/main/steps/applicant1/hub-page/sole/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,6 @@ const en = (
}`,
},
},
bailiffServiceUnsuccessful: {
line1: `The court bailiff tried to ‘serve’ the ${
isDivorce ? 'divorce papers' : 'papers to end your civil partnership'
} at the address you provided. Unfortunately the bailiff was unsuccessful and so your ${partner} has still not been served.`,
line2: {
part1: 'Read the ',
part2: 'bailiff service certificate',
part3: ', to see what you can do next.',
downloadReference: 'Bailiff-certificate',
link: '/downloads/bailiff-unsuccessful-certificate-of-service',
},
},
awaitingServicePayment: {
line1OfflineApplication:
'Your application for service has been received. You need to pay the service application fee before it can be referred to a judge to consider your request. The court will contact you on how payment can be made.',
Expand Down Expand Up @@ -808,18 +796,6 @@ const cy: typeof en = (
heading1: 'Anfon eich tystiolaeth i’r llys',
line1: 'Nawr mae arnoch angen anfon eich dogfennau atom. Gallwch wneud hyn trwy un o’r ffyrdd canlynol:',
},
bailiffServiceUnsuccessful: {
line1: `Ceisiodd beili'r llys 'gyflwyno' ${
isDivorce ? 'papurau’r ysgariad' : "papurau i ddod â'ch partneriaeth sifil i ben"
} yn y cyfeiriad a ddarparwyd gennych. Yn anffodus, ni lwyddodd y beili i wneud hyn ac felly nid yw eich ${partner} wedi cael y papurau.`,
line2: {
part1: 'Darllenwch ',
part2: 'dystysgrif y gwasanaeth beili',
part3: ', i weld beth allwch chi ei wneud nesaf.',
downloadReference: 'Bailiff-certificate',
link: '/downloads/bailiff-unsuccessful-certificate-of-service',
},
},
awaitingServicePayment: {
line1OfflineApplication:
"Mae eich cais am wasanaeth wedi'i dderbyn. Mae angen i chi dalu'r ffi cais am wasanaeth cyn y gellir ei gyfeirio at farnwr i ystyried eich cais. Bydd y llys yn cysylltu â chi ynghylch sut y gellir talu.",
Expand Down Expand Up @@ -1062,7 +1038,6 @@ export const generateContent: TranslationFn = content => {
const theLatestUpdateTemplate = getSoleHubTemplate(
displayState,
userCase,
isSuccessfullyServedByBailiff,
isAlternativeService,
isApplicantAbleToRespondToRequestForInformation,
isAwaitingProcessServerService
Expand Down

This file was deleted.

Loading