From 165eeb51e7a3671365387381db9d79a25617914a Mon Sep 17 00:00:00 2001
From: Vivek Kumar
Date: Wed, 5 Feb 2025 15:27:53 +0000
Subject: [PATCH 1/6] EPP-45 initial commit
---
apps/epp-new/index.js | 1 +
apps/epp-new/translations/src/en/pages.json | 21 ++++++
apps/epp-new/views/upload-proof-address.html | 75 ++++++++++++++++++++
3 files changed, 97 insertions(+)
create mode 100644 apps/epp-new/views/upload-proof-address.html
diff --git a/apps/epp-new/index.js b/apps/epp-new/index.js
index 4337ad7..d62ce26 100644
--- a/apps/epp-new/index.js
+++ b/apps/epp-new/index.js
@@ -162,6 +162,7 @@ module.exports = {
}
},
'/upload-proof-address': {
+ // new-renew-proof-address
fields: [],
next: '/contact-details',
locals: {
diff --git a/apps/epp-new/translations/src/en/pages.json b/apps/epp-new/translations/src/en/pages.json
index bed22ea..7f07a03 100644
--- a/apps/epp-new/translations/src/en/pages.json
+++ b/apps/epp-new/translations/src/en/pages.json
@@ -72,6 +72,27 @@
"countersignatory-contact":{
"header": "Countersignatory's contact details"
},
+ "upload-proof-address": {
+ "header": "Upload proof of address",
+ "p1": "You need to scan and attach 2 documents as proof of your home address. The documents must be dated within the last 3 months and",
+ "p2": "The first document must be one of the following:",
+ "p3": "The second document must be one of the following:",
+ "p1-li1": "Mortgage statements",
+ "p1-li2": "bank or building society statement",
+ "p2-li1": "credit card statement",
+ "p2-li2": "rental agreement",
+ "p2-li3": "utilities bill (including energy, water, internet or phone bills)",
+ "p2-li4": "council tax bill",
+ "p2-li5": "benefit statement",
+ "link": "https://www.gov.uk/government/publications/explosives-precursors-licence-applications-countersignatory/explosives-precursors-and-poisons-licence-applications-how-to-get-documents-countersigned",
+ "link-text": "signed by your countersignatory (opens in a new tab)",
+ "upload-file": "Upload a file",
+ "file-format": "Your file must be JPEG, PDF or PNG, and be 25MB or less",
+ "no-file-uploaded": "No files uploaded",
+ "you-have-uploaded": "You have uploaded",
+ "files": "file(s)",
+ "uploading-document": "Uploading your document..."
+ },
"confirm": {
"header": "Check your answers",
"title": "Check your answers – Apply for an explosives precursors and poisons licence",
diff --git a/apps/epp-new/views/upload-proof-address.html b/apps/epp-new/views/upload-proof-address.html
new file mode 100644
index 0000000..c0323c6
--- /dev/null
+++ b/apps/epp-new/views/upload-proof-address.html
@@ -0,0 +1,75 @@
+{{{{#t}}pages.upload-proof-address.p1{{/t}}
+
+ {{#t}}pages.upload-proof-address.link-text{{/t}}
+
+
+
+{{#t}}pages.upload-proof-address.p2{{/t}}
+
+
+ {{#t}}pages.upload-proof-address.p1-li1{{/t}}
+ {{#t}}pages.upload-proof-address.p1-li2{{/t}}
+
+
+{{#t}}pages.upload-proof-address.p3{{/t}}
+
+
+ {{#t}}pages.upload-proof-address.p2-li1{{/t}}
+ {{#t}}pages.upload-proof-address.p2-li2{{/t}}
+ {{#t}}pages.upload-proof-address.p2-li3{{/t}}
+ {{#t}}pages.upload-proof-address.p2-li4{{/t}}
+ {{#t}}pages.upload-proof-address.p2-li5{{/t}}
+
+
+
+
+{{^values.new-renew-proof-address}}
+{{#t}}pages.upload-proof-address.no-file-uploaded{{/t}}
+{{/values.new-renew-proof-address}}
+
+{{#values.new-renew-proof-address.length}}
+{{#t}}pages.upload-proof-address.you-have-uploaded{{/t}} {{values.new-renew-proof-address.length}} {{#t}}pages.upload-proof-address.files{{/t}}
+
+
+ {{#values.new-renew-proof-address}}
+
+
+ {{/values.new-renew-proof-address}}
+
+
+{{/values.new-renew-proof-address.length}}
+
+
+
+ {{#t}}buttons.continue{{/t}}
+
+
+{{/page-content}}
+{{/partials-page}}
\ No newline at end of file
From cc99ba765cc102c4d6a87b5d5e13e6a8b5323b88 Mon Sep 17 00:00:00 2001
From: Vivek Kumar
Date: Mon, 10 Feb 2025 10:26:07 +0000
Subject: [PATCH 2/6] EPP-45 upload address proof page
---
apps/epp-new/index.js | 7 +++++--
apps/epp-new/sections/summary-data-sections.js | 16 ++++++++++++++++
apps/epp-new/translations/src/en/pages.json | 3 +++
apps/epp-new/translations/src/en/validation.json | 3 ++-
config.js | 5 +++++
5 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/apps/epp-new/index.js b/apps/epp-new/index.js
index 35a2cd6..414dc83 100644
--- a/apps/epp-new/index.js
+++ b/apps/epp-new/index.js
@@ -192,8 +192,11 @@ module.exports = {
}
},
'/upload-proof-address': {
- // new-renew-proof-address
- fields: [],
+ behaviours: [
+ SaveDocument('new-renew-proof-address', 'file-upload'),
+ RemoveDocument('new-renew-proof-address')
+ ],
+ fields: ['file-upload'],
next: '/contact-details',
locals: {
sectionNo: {
diff --git a/apps/epp-new/sections/summary-data-sections.js b/apps/epp-new/sections/summary-data-sections.js
index e411b9f..298b0dd 100644
--- a/apps/epp-new/sections/summary-data-sections.js
+++ b/apps/epp-new/sections/summary-data-sections.js
@@ -148,6 +148,22 @@ module.exports = {
step: '/home-address',
field: 'new-renew-home-address-moveto-date',
parse: date => date && dateFormatter.format(new Date(date))
+ },
+ {
+ step: '/upload-proof-address',
+ field: 'new-renew-proof-address',
+ parse: (documents, req) => {
+ if (
+ req.sessionModel
+ .get('steps')
+ .includes('/upload-proof-address') &&
+ documents?.length > 0
+ ) {
+ return documents.map(file => file?.name);
+ }
+
+ return null;
+ }
}
]
},
diff --git a/apps/epp-new/translations/src/en/pages.json b/apps/epp-new/translations/src/en/pages.json
index 8095c09..0f77cb9 100644
--- a/apps/epp-new/translations/src/en/pages.json
+++ b/apps/epp-new/translations/src/en/pages.json
@@ -224,6 +224,9 @@
},
"new-renew-british-passport": {
"label": "Image of passport"
+ },
+ "new-renew-proof-address": {
+ "label": "Proof of address attachments"
}
},
"complete": {
diff --git a/apps/epp-new/translations/src/en/validation.json b/apps/epp-new/translations/src/en/validation.json
index 03b8234..2a0e85a 100644
--- a/apps/epp-new/translations/src/en/validation.json
+++ b/apps/epp-new/translations/src/en/validation.json
@@ -185,7 +185,8 @@
"unsaved": "Your file could not be uploaded – try again",
"maxFileSize": "The selected file must be 25MB or smaller",
"fileType": "The selected file must be a JPG, PDF or PNG",
- "maxNewRenewBritishPassport" : "You can only upload upto {{maxNewRenewBritishPassport}} files or less. Remove a file before uploading another"
+ "maxNewRenewBritishPassport" : "You can only upload upto {{maxNewRenewBritishPassport}} files or less. Remove a file before uploading another",
+ "maxNewRenewProofAddress" : "You can only upload upto {{maxNewRenewProofAddress}} files or less. Remove a file before uploading another"
},
"new-renew-countersignatory-title": {
"required": "Select your countersignatory's title"
diff --git a/config.js b/config.js
index 50988b6..d427029 100644
--- a/config.js
+++ b/config.js
@@ -60,6 +60,11 @@ module.exports = {
allowMultipleUploads: false,
limit: 1,
limitValidationError: 'maxNewRenewBritishPassport'
+ },
+ 'new-renew-proof-address': {
+ allowMultipleUploads: true,
+ limit: 2,
+ limitValidationError: 'maxNewRenewProofAddress'
}
}
},
From 1057cf8160e93e851181120920de2b7203230cb7 Mon Sep 17 00:00:00 2001
From: Vivek Kumar
Date: Mon, 10 Feb 2025 13:19:30 +0000
Subject: [PATCH 3/6] EPP-45 show uploads in separate line
---
apps/epp-new/sections/summary-data-sections.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/epp-new/sections/summary-data-sections.js b/apps/epp-new/sections/summary-data-sections.js
index 298b0dd..be66adb 100644
--- a/apps/epp-new/sections/summary-data-sections.js
+++ b/apps/epp-new/sections/summary-data-sections.js
@@ -159,7 +159,7 @@ module.exports = {
.includes('/upload-proof-address') &&
documents?.length > 0
) {
- return documents.map(file => file?.name);
+ return documents.map(file => file?.name)?.join('\n\n');
}
return null;
From 11f5af4cac5e2c8818947f8a56dc60ad6253780c Mon Sep 17 00:00:00 2001
From: Vivek Kumar
Date: Mon, 10 Feb 2025 15:46:31 +0000
Subject: [PATCH 4/6] EPP-45 updated files uploaded label
---
apps/epp-new/translations/src/en/pages.json | 6 ++----
apps/epp-new/views/upload-british-passport.html | 2 +-
apps/epp-new/views/upload-proof-address.html | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/apps/epp-new/translations/src/en/pages.json b/apps/epp-new/translations/src/en/pages.json
index 0f77cb9..97040bd 100644
--- a/apps/epp-new/translations/src/en/pages.json
+++ b/apps/epp-new/translations/src/en/pages.json
@@ -74,8 +74,7 @@
"upload-file": "Upload a file",
"file-format": "Your file must be JPEG, PDF or PNG, and be 25MB or less",
"no-file-uploaded": "No files uploaded",
- "you-have-uploaded": "You have uploaded",
- "files": "file(s)",
+ "files-uploaded": "Files uploaded",
"uploading-document": "Uploading your document..."
},
"countersignatory-details": {
@@ -105,8 +104,7 @@
"upload-file": "Upload a file",
"file-format": "Your file must be JPEG, PDF or PNG, and be 25MB or less",
"no-file-uploaded": "No files uploaded",
- "you-have-uploaded": "You have uploaded",
- "files": "file(s)",
+ "files-uploaded": "Files uploaded",
"uploading-document": "Uploading your document..."
},
"confirm": {
diff --git a/apps/epp-new/views/upload-british-passport.html b/apps/epp-new/views/upload-british-passport.html
index d9f7273..4935973 100644
--- a/apps/epp-new/views/upload-british-passport.html
+++ b/apps/epp-new/views/upload-british-passport.html
@@ -35,7 +35,7 @@ {{#t}}pages.upload-british-passport.no-file-uploaded
{{/values.new-renew-british-passport}}
{{#values.new-renew-british-passport.length}}
-{{#t}}pages.upload-british-passport.you-have-uploaded{{/t}} {{values.new-renew-british-passport.length}} {{#t}}pages.upload-british-passport.files{{/t}}
+{{#t}}pages.upload-british-passport.files-uploaded{{/t}}
{{#values.new-renew-british-passport}}
diff --git a/apps/epp-new/views/upload-proof-address.html b/apps/epp-new/views/upload-proof-address.html
index c0323c6..85b0d0b 100644
--- a/apps/epp-new/views/upload-proof-address.html
+++ b/apps/epp-new/views/upload-proof-address.html
@@ -48,7 +48,7 @@
{{#t}}pages.upload-proof-address.no-file-uploaded{{/
{{/values.new-renew-proof-address}}
{{#values.new-renew-proof-address.length}}
-{{#t}}pages.upload-proof-address.you-have-uploaded{{/t}} {{values.new-renew-proof-address.length}} {{#t}}pages.upload-proof-address.files{{/t}}
+{{#t}}pages.upload-proof-address.files-uploaded{{/t}}
{{#values.new-renew-proof-address}}
From ed2ea0077d6b490f72d70362f3f1d4993216109e Mon Sep 17 00:00:00 2001
From: Vivek Kumar
Date: Tue, 11 Feb 2025 16:43:03 +0000
Subject: [PATCH 5/6] EPP-45 resolved conflicts
---
config.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.js b/config.js
index c378b3b..ae5783c 100644
--- a/config.js
+++ b/config.js
@@ -66,11 +66,11 @@ module.exports = {
limit: 1,
limitValidationError: 'maxAmendBritishPassport'
},
- 'new-renew-proof-address': {
+ 'new-renew-proof-address': {
allowMultipleUploads: true,
limit: 2,
limitValidationError: 'maxNewRenewProofAddress'
- }
+ }
}
},
sectionDetails: {
From d2c77d6b50ddd2390c54af091391700bcc556cfd Mon Sep 17 00:00:00 2001
From: Vivek Kumar
Date: Thu, 13 Feb 2025 09:18:12 +0000
Subject: [PATCH 6/6] EPP-45 resolved merge conflicts
---
config.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.js b/config.js
index c668e1d..0d3d5f7 100644
--- a/config.js
+++ b/config.js
@@ -71,11 +71,11 @@ module.exports = {
limit: 1,
limitValidationError: 'maxNewRenewEuPassport'
},
- 'new-renew-proof-address': {
+ 'new-renew-proof-address': {
allowMultipleUploads: true,
limit: 2,
limitValidationError: 'maxNewRenewProofAddress'
- }
+ }
}
},
sectionDetails: {