Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ withPipeline(type, product, component) {

// uncomment to connect backend PR
// onPR {
// env.CASE_TYPE="NFD-4397"
env.CASE_TYPE="NFD-4776"
// }
}
2 changes: 1 addition & 1 deletion charts/nfdiv-frontend/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nodejs:
enabled: false
environment:
IDAM_TOKEN_CACHE: true
# CASE_TYPE: NFD-4397 # Uncomment to connect to backend PR, don't forget Jenkinsfile_CNP too
CASE_TYPE: NFD-4776 # Uncomment to connect to backend PR, don't forget Jenkinsfile_CNP too
keyVaults:
nfdiv:
resourceGroup: nfdiv
Expand Down
6 changes: 6 additions & 0 deletions src/main/app/case/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ export const formFieldsToCaseMapping: Partial<Record<keyof Case, keyof CaseData>
serviceApplicationAnswers: 'serviceApplicationAnswers',
applicant1InterimApplicationType: 'applicant1InterimApplicationType',
applicant1InterimAppsStatementOfTruth: 'applicant1InterimAppsStatementOfTruth',
applicant1NoRespAddressHasFoundAddress: 'applicant1NoRespAddressHasFoundAddress',
applicant1NoRespAddressHasWayToContact: 'applicant1NoRespAddressHasWayToContact',
applicant1NoRespAddressWillApplyAltService: 'applicant1NoRespAddressWillApplyAltService',
applicant1NoResponseOwnSearches: 'applicant1NoResponseOwnSearches',
applicant1NoResponseRespondentAddressInEnglandWales: 'applicant1NoResponseRespondentAddressInEnglandWales',
applicant1NoResponsePartnerInUkOrReceivingBenefits: 'applicant1NoResponsePartnerInUkOrReceivingBenefits',
Expand Down Expand Up @@ -650,6 +653,9 @@ export interface Case {
applicant1InterimApplicationType?: InterimApplicationType;
applicant2InterimApplicationType?: InterimApplicationType;
applicant1InterimAppsStatementOfTruth?: Checkbox;
applicant1NoRespAddressHasFoundAddress: YesOrNo;
applicant1NoRespAddressHasWayToContact: YesOrNo;
applicant1NoRespAddressWillApplyAltService: YesOrNo;
applicant1NoResponseOwnSearches?: NoResponseOwnSearches;
applicant1NoResponseRespondentAddressInEnglandWales?: Checkbox;
applicant1NoResponsePartnerInUkOrReceivingBenefits?: YesOrNo;
Expand Down
3 changes: 3 additions & 0 deletions src/main/app/case/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,9 @@ export interface CaseData {
applicant1SearchGovRecordsPartnerAdditionalAddressDates1: string;
applicant1SearchGovRecordsPartnerAdditionalAddress2?: string;
applicant1SearchGovRecordsPartnerAdditionalAddressDates2?: string;
applicant1NoRespAddressHasFoundAddress: YesOrNo;
applicant1NoRespAddressHasWayToContact: YesOrNo;
applicant1NoRespAddressWillApplyAltService: YesOrNo;
applicant1NoResponseOwnSearches: NoResponseOwnSearches;
applicant1NoResponseRespondentAddressInEnglandWales: YesOrNo;
applicant1NoResponsePartnerInUkOrReceivingBenefits: YesOrNo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
{% block after_form %}
<p class="govuk-body">{{ alsoTry.header }}</p>
<ul class="govuk-list govuk-list--bullet">
<li>{{ alsoTry.options.deemedService | safe }}</li>
{% if not isApp2Confidential and not isApp2Represented %}
<li>{{ alsoTry.options.updateDetails | safe }}</li>
{% endif %}
<li>{{ alsoTry.options.applyProcessServerOrBailiff | safe }}</li>
{% if caseHasBeenIssued %}
<li>{{ alsoTry.options.deemedService | safe }}</li>
<li>{{ alsoTry.options.applyProcessServerOrBailiff | safe }}</li>
{% endif %}
<li>{{ alsoTry.options.searchRecords | safe }}</li>
<li>{{ alsoTry.options.dispenseService | safe }}</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import {
DEEMED_SERVICE_APPLICATION,
DISPENSE_SERVICE_APPLICATION,
NEW_POSTAL_AND_EMAIL,
NO_RESP_ADDRESS_ENTER_ADDRESS,
PARTNER_IN_PERSON,
SEARCH_GOV_RECORDS_APPLICATION,
} from '../../../../urls';

const en = ({ isDivorce, partner }: CommonContent) => ({
const en = ({ isDivorce, partner }: CommonContent, updateDetailsLinkPath) => ({
alsoTry: {
header: 'You could also try:',
options: {
applyBailiff: `applying to have a <a class="govuk-link" href="${PARTNER_IN_PERSON}"">bailiff serve the papers</a> to your ${partner} in person.`,
applyProcessServer: `applying to have a <a class="govuk-link" href="${PARTNER_IN_PERSON}"">process server serve the papers</a> to your ${partner} in person.`,
applyProcessServerOrBailiff: `applying to have a <a class="govuk-link" href="${PARTNER_IN_PERSON}"">bailiff or process server serve the papers</a> to your ${partner} in person.`,
updateDetails: `<a class="govuk-link" href="${NEW_POSTAL_AND_EMAIL}">updating your ${partner}'s contact details</a> so that the court can send the ${
updateDetails: `<a class="govuk-link" href="${updateDetailsLinkPath}">updating your ${partner}'s contact details</a> so that the court can send the ${
isDivorce ? 'divorce papers' : 'papers to end your civil partnership'
} to their new address.`,
differentWay: `applying to <a class="govuk-link" href="${ALTERNATIVE_SERVICE_APPLICATION}">have your ${
Expand All @@ -32,14 +33,14 @@ const en = ({ isDivorce, partner }: CommonContent) => ({
});

// @TODO translations should be completed and verified
const cy = ({ isDivorce, partner }: CommonContent) => ({
const cy = ({ isDivorce, partner }: CommonContent, updateDetailsLinkPath) => ({
alsoTry: {
header: 'Gallwch hefyd geisio:',
options: {
applyBailiff: `gwneud cais i <a class="govuk-link" href="${PARTNER_IN_PERSON}"">feili gyflwyno’r papurau</a> i’ch ${partner} yn bersonol.`,
applyProcessServer: `gwneud cais i <a class="govuk-link" href="${PARTNER_IN_PERSON}"">weinyddwr proses gyflwyno’r papurau</a> i’ch ${partner} yn bersonol.`,
applyProcessServerOrBailiff: `gwneud cais i <a class="govuk-link" href="${PARTNER_IN_PERSON}"">feili neu weinyddwr proses gyflwyno’r papurau</a> i’ch ${partner} yn bersonol.`,
updateDetails: `<a class="govuk-link" href="${NEW_POSTAL_AND_EMAIL}">diweddaru manylion cyswllt eich ${partner}</a> fel y gall y llys anfon papurau’r ${
updateDetails: `<a class="govuk-link" href="${updateDetailsLinkPath}">diweddaru manylion cyswllt eich ${partner}</a> fel y gall y llys anfon papurau’r ${
isDivorce ? 'ysgariad' : 'cais i ddod â’ch partneriaeth sifil i ben'
} i’w cyfeiriad newydd.`,
differentWay: `gwneud cais i <a class="govuk-link" href="${ALTERNATIVE_SERVICE_APPLICATION}">bapurau eich ${
Expand All @@ -60,7 +61,9 @@ const languages = {
};

export const generateContent: TranslationFn = content => {
const translations = languages[content.language](content);
const updateDetailsLinkPath = content.caseHasBeenIssued ? NEW_POSTAL_AND_EMAIL : NO_RESP_ADDRESS_ENTER_ADDRESS;

const translations = languages[content.language](content, updateDetailsLinkPath);
return {
...translations,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,15 @@ export const generateContent: TranslationFn = content => {
const uploadedDocsFilenames = content.userCase.applicant1InterimAppsEvidenceDocs?.map(item =>
getFilename(item.value)
);
const amendable = content.isAmendableStates;

const uploadContentScript = `{
"isAmendableStates": ${content.isAmendableStates},
"isAmendableStates": "true",
"delete": "${content.delete}"
}`;
return {
...applicant1UploadDocumentContent,
...translations,
form: { ...form, fields: (form.fields as FormFieldsFn)(content.userCase || {}) },
amendable,
uploadedDocsFilenames,
uploadContentScript,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ uploadContentScript | safe }}
</script>

<div class="govuk-form-group {{ 'hidden' if not amendable }}">
<div class="govuk-form-group">
<div class="govuk-panel upload hidden">
<span class="upload-arrow-icon govuk-!-margin-bottom-5"></span>
<div class="govuk-form-group">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { YesOrNo } from '../../../../../app/case/definition';
import { TranslationFn } from '../../../../../app/controller/GetController';
import { FormContent } from '../../../../../app/form/Form';
import { isFieldFilledIn } from '../../../../../app/form/validation';
import { CommonContent } from '../../../../common/common.content';

const en = ({ partner }: CommonContent) => ({
title: 'Enter their postal address',
errors: {
applicant1NoRespAddressFoundAddress: {
required: `Select yes if you have found your ${partner}'s address.`,
},
},
});

const cy = ({ partner }: CommonContent) => ({
title: 'Enter their postal address',
errors: {
applicant1NoRespAddressFoundAddress: {
required: `Select yes if you have found your ${partner}'s address.`,
},
},
});

export const form: FormContent = {
fields: {
applicant1NoRespAddressHasFoundAddress: {
type: 'radios',
classes: 'govuk-radios',
label: l => l.detailsUpToDateHeader,
labelHidden: false,
values: [
{
label: l => l.yes,
value: YesOrNo.YES,
},
{
label: l => l.no,
value: YesOrNo.NO,
},
],
validator: value => isFieldFilledIn(value),
},
},
submit: {
text: l => l.continue,
},
};

const languages = {
en,
cy,
};

export const generateContent: TranslationFn = content => {
const translations = languages[content.language](content);

return {
...translations,
form,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% extends "common/form/form.njk"%}
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
{% from "govuk/components/details/macro.njk" import govukDetails %}
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{% from "common/macros/service-address.njk" import serviceAddressMacro %}

{% extends "common/page.njk" %}

{% block page_content %}
<h1 class="govuk-heading-l" id="enterAddressTitle">{{ title }}</h1>
<p class="govuk-body">{{ line1 }}</p>
{% endblock %}

{% block form %}
{% include "./form.njk" %}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { YesOrNo } from '../../../../../app/case/definition';
import { TranslationFn } from '../../../../../app/controller/GetController';
import { FormContent } from '../../../../../app/form/Form';
import { isFieldFilledIn } from '../../../../../app/form/validation';
import { CommonContent } from '../../../../common/common.content';

const en = ({ partner }: CommonContent) => ({
title: `Do you have a different way to contact your ${partner}?`,
line1: `This could include an email address, a phone number or social media. It should be something that your ${partner} actively uses.`,
errors: {
applicant1NoRespAddressHasWayToContact: {
required: `Select yes if you have a different way to contact your ${partner}.`,
},
},
});

const cy = ({ partner }: CommonContent) => ({
title: `Do you have a different way to contact your ${partner}?`,
line1: `This could include an email address, a phone number or social media. It should be something that your ${partner} actively uses.`,
errors: {
applicant1NoRespAddressHasWayToContact: {
required: `Select yes if you have a different way to contact your ${partner}.`,
},
},
});

export const form: FormContent = {
fields: {
applicant1NoRespAddressHasWayToContact: {
type: 'radios',
classes: 'govuk-radios',
label: l => l.detailsUpToDateHeader,
labelHidden: false,
values: [
{
label: l => l.yes,
id: 'yes',
value: YesOrNo.YES,
},
{
label: l => l.no,
id: 'no',
value: YesOrNo.NO,
},
],
validator: value => isFieldFilledIn(value),
},
},
submit: {
text: l => l.continue,
},
};

const languages = {
en,
cy,
};

export const generateContent: TranslationFn = content => {
const translations = languages[content.language](content);

return {
...translations,
form,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% extends "common/form/form.njk"%}
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
{% from "govuk/components/details/macro.njk" import govukDetails %}
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{% from "common/macros/service-address.njk" import serviceAddressMacro %}

{% extends "common/page.njk" %}

{% block page_content %}
<h1 class="govuk-heading-l" id="haveDifferentWayToContactTitle">{{ title }}</h1>
<p class="govuk-body">{{ line1 }}</p>
{% endblock %}

{% block form %}
{% include "./form.njk" %}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { YesOrNo } from '../../../../../app/case/definition';
import { TranslationFn } from '../../../../../app/controller/GetController';
import { FormContent } from '../../../../../app/form/Form';
import { isFieldFilledIn } from '../../../../../app/form/validation';
import { CommonContent } from '../../../../common/common.content';

const en = ({ partner }: CommonContent) => ({
title: `Have you been able to find your ${partner}'s address?`,
line1: `This can be their home address, or the address of their solicitor if they have one. You can also provide a work address if you have your ${partner}'s permission to do so.`,
errors: {
applicant1NoRespAddressFoundAddress: {
required: `Select yes if you have found your ${partner}'s address.`,
},
},
});

const cy = ({ partner }: CommonContent) => ({
title: `Have you been able to find your ${partner}'s address?`,
line1: `This can be their home address, or the address of their solicitor if they have one. You can also provide a work address if you have your ${partner}'s permission to do so.`,
errors: {
applicant1NoRespAddressFoundAddress: {
required: `Select yes if you have found your ${partner}'s address.`,
},
},
});

export const form: FormContent = {
fields: {
applicant1NoRespAddressHasFoundAddress: {
type: 'radios',
classes: 'govuk-radios',
label: l => l.detailsUpToDateHeader,
labelHidden: false,
values: [
{
label: l => l.yes,
id: 'yes',
value: YesOrNo.YES,
},
{
label: l => l.no,
id: 'no',
value: YesOrNo.NO,
},
],
validator: value => isFieldFilledIn(value),
},
},
submit: {
text: l => l.continue,
},
};

const languages = {
en,
cy,
};

export const generateContent: TranslationFn = content => {
const translations = languages[content.language](content);

return {
...translations,
form,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% extends "common/form/form.njk"%}
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
{% from "govuk/components/details/macro.njk" import govukDetails %}
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
{% from "common/macros/service-address.njk" import serviceAddressMacro %}

{% extends "common/page.njk" %}

{% block page_content %}
<h1 class="govuk-heading-l" id="haveYouFoundAddressTitle">{{ title }}</h1>
<p class="govuk-body">{{ line1 }}</p>
{% endblock %}

{% block form %}
{% include "./form.njk" %}
{% endblock %}
Loading