Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPP-58 Create a what is YOUR DOB page for Amend #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 7 additions & 1 deletion apps/epp-amend/fields/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
module.exports = {
const dateComponent = require('hof').components.date;

module.exports = {
'amend-date-of-birth': dateComponent('amend-date-of-birth', {
mixin: 'input-date',
legend: { className: 'bold' },
validate: ['required', 'date', 'before']
})
};
13 changes: 7 additions & 6 deletions apps/epp-amend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@ module.exports = {
translations: 'apps/epp-amend/translations',
baseUrl: '/amend-license',
steps: {
'/section-one': {
'/amend-licence-number': {
behaviours: [validateAndRedirect],
backLink: '/application-type',
fields: ['amend-licence-number'],
next: '/section-two'
next: '/amend-name-on-licence'
},
'/section-two': {
'/amend-name-on-licence': {
fields: [
'amend-name-title',
'amend-firstname',
'amend-middlename',
'amend-lastname'
],
next: '/section-three'
next: '/amend-date-of-birth'
},
'/section-three': {
'/amend-date-of-birth': {
fields: ['amend-date-of-birth'],
next: '/section-four'
next: '/confirm',
locals: {captionHeading: 'Section 3 of 20'}
},
'/section-four': {
fields: [
Expand Down
39 changes: 39 additions & 0 deletions apps/epp-amend/sections/summary-data-sections.js
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
'use strict';

module.exports = {
'Licence details': {
steps: [
{
step: '/amend-licence-number',
field: 'amend-licence-number'
}
]
},
'Applicant name': {
steps: [
{
step: '/amend-name-on-licence',
field: 'amend-name-title'
},
{
step: '/amend-name-on-licence',
field: 'amend-firstname'
},
{
step: '/amend-name-on-licence',
field: 'amend-middlename'
},
{
step: '/amend-name-on-licence',
field: 'amend-lastname'
}
]
},
'Applicant date of': {
steps: [
{
step: '/amend-date-of-birth',
field: 'amend-date-of-birth'
}
]
}
};
6 changes: 5 additions & 1 deletion apps/epp-amend/translations/src/en/fields.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{

"amend-date-of-birth": {
"hint": " For example, 30 09 1969",
"label": "Date of birth"

}
}
22 changes: 20 additions & 2 deletions apps/epp-amend/translations/src/en/pages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
{
"application-submitted": {
"confirmed": "Amendment submitted"
"amend-date-of-birth": {
"header": " What is your date of Birth?"
},
"application-submitted": {
"confirmed": "Amendment submitted"
},

"confirm": {
"header": "Check your answers",
"subheader": "Review your answers below and amend if required before proceeding to declaration and payment.",
"sections": {
"Applicant date of birth": {
"header": "Applicant date of birth"
}
}
},
"fields": {
"amend-date-of-birth": {
"label": "Date of birth"
}
}
}
8 changes: 7 additions & 1 deletion apps/epp-amend/translations/src/en/validation.json
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
{}
{
"amend-date-of-birth": {
"required": "Enter your date of birth",
"date": "Enter a real date",
"before": "Your date of birth must be in the past"
}
}
2 changes: 1 addition & 1 deletion apps/epp-common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
}
},
{
target: '/amend-license/section-one',
target: '/amend-license/amend-licence-number',
condition: {
field: 'application-type',
value: 'amend'
Expand Down