Skip to content

Commit

Permalink
EPP 34 skeleton for Replace Flow
Browse files Browse the repository at this point in the history
- Added route flow according to the figma design
- Added field name
  • Loading branch information
TemitopeAyokuHO committed Dec 24, 2024
1 parent f493bc5 commit aa9279e
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 12 deletions.
5 changes: 4 additions & 1 deletion apps/epp-amend/translations/src/en/pages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"application-submitted": {
"confirmed": "Amendment submitted"
"confirmed": "Replace application submitted"
},
"confirm": {
"header": "Check your answers"
}
}
3 changes: 1 addition & 2 deletions apps/epp-amend/views/application-submitted.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<h1 class="govuk-panel__title">
{{#t}}pages.application-submitted.confirmed{{/t}}
</h1>
<h2 class="govuk-!-font-weight-regular govuk-!-margin-bottom-0 ref-number-heading">Confirmation sent to</h2>
<h2 class="govuk-!-font-weight-bold govuk-!-margin-top-0 ref-number"><strong></strong></h2>
<h2 class="govuk-!-font-weight-regular govuk-!-margin-bottom-0">Payment successful</h2>
</div>
{{/page-content}}
{{/partials-page}}
2 changes: 1 addition & 1 deletion apps/epp-common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
}
}
],
next: '/replace-license/start'
next: '/replace-license/section-one'
}
}
};
184 changes: 177 additions & 7 deletions apps/epp-replace/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const validateAndRedirect = require('./behaviours/home-redirection');
const SummaryPageBehaviour = require('hof').components.summary;

module.exports = {
name: 'EPP form',
Expand All @@ -7,17 +8,186 @@ module.exports = {
translations: 'apps/epp-replace/translations',
baseUrl: '/replace-license',
steps: {
'/start': {
'/section-one': {
behaviours: [validateAndRedirect],
backLink: '/application-type',
next: '/second-route'
fields: ['replace-licence'],
next: '/section-two'
},
'/second-route': {
backLink: 'start',
next: '/third-route'
'/section-two': {
fields: ['replace-is-crime-reported'],
next: '/report-details'
},
'/third-route': {
backLink: 'second-route'
'/report-to-police': {
backLink: '/section-two'
},
'/report-details': {
fields: ['replace-report-details'],
next: '/section-three'
},
'/section-three': {
fields: ['replace-licence-number'],
next: '/section-four'
},
'/section-four': {
fields: [
'replace-name-title',
'replace-firstname',
'replace-middlename',
'replace-lastname'
],
next: '/section-five'
},
'/section-five': {
fields: ['replace-date-of-birth'],
next: '/section-six'
},
'/section-six': {
fields: [
'replace-post-address-1',
'replace-post-address-2',
'replace-post-town-or-city',
'replace-post-county',
'replace-post-postcode',
'replace-post-country'
],
next: '/section-seven'
},
'/section-seven': {
fields: [
'replace-phone-number',
'replace-email'
],
next: '/section-eight'
},
'/section-eight': {
fields: ['replace-is-details-changed'],
next: '/section-nine'
},
'/section-nine': {
fields: [
'replace-replace-type'
],
next: '/section-ten'
},
'/section-ten': {
fields: [
'replace-new-name-title',
'replace-new-firstname',
'replace-new-middlename',
'replace-new-lastname',
'replace-date-new-name-changed'
],
next: '/section-eleven'
},
'/section-eleven': {
fields: ['replace-which-document-type'],
next: '/section-twelve'
},
'/section-twelve': {
next: '/section-thirteen'
},
'/section-thirteen': {
fields: [
'replace-new-post-address-1',
'replace-new-post-address-2',
'replace-new-post-town-or-city',
'replace-new-post-county',
'replace-new-post-postcode',
'replace-new-post-country',
'replace-new-date-moved-to-address'
],
next: '/section-fourteen'
},
'/section-fourteen': {
next: '/section-fifteen'
},
'/section-fifteen': {
fields: [
'replace-reason-for-licence'
],
next: '/section-sixteen'
},
'/section-sixteen': {
fields: [
'replace-explosive-precusor-type'
],
// fields: [
// 'replace-countersignatory-address-1',
// 'replace-countersignatory-address-2',
// 'replace-countersignatory-town-or-city',
// 'replace-countersignatory-postcode'
// ],
next: '/section-sixteen-type'
},
'/section-sixteen-type': {
fields: [
'replace-explosive-precusor-details'
],
next: '/section-sixteen-summary'
},
'/section-sixteen-summary': {
next: '/section-seventeen'
},
'/section-seventeen': {
fields: [
'replace-poison-type'
],
next: '/section-eighteen'
},
'/section-seventeen-poison': {
fields: [
'replace-poison-details'
],
next: '/section-seventeen-summary'
},
'/section-seventeen-summary': {
next: '/section-eighteen'
},
'/section-eighteen': {
fields: [
'replace-countersignatory-name-title',
'replace-countersignatory-firstname',
'replace-countersignatory-middlename',
'replace-countersignatory-lastname',
'replace-years-known-countersignatory',
'replace-how-you-know-countersignatory',
'replace-countersignatory-occupation'
],
next: '/section-nineteen'
},
'/section-nineteen': {
fields: [
'replace-countersignatory-address-1',
'replace-countersignatory-address-2',
'replace-countersignatory-town-or-city',
'replace-countersignatory-postcode'
],
next: '/section-twenty'
},
'/section-twenty': {
fields: [
'replace-countersignatory-phone',
'replace-countersignatory-email'
],
next: '/section-twenty-one'
},
'/section-twenty-one': {
fields: [
'replace-countersignatory-document-type'
],
next: '/confirm'
},
'/confirm': {
sections: require('./sections/summary-data-sections'),
behaviours: [SummaryPageBehaviour],
next: '/declaration'
},
'/declaration': {
next: '/application-submitted'
},
'/application-submitted': {
clearSession: true
}
}
};
1 change: 1 addition & 0 deletions apps/epp-replace/sections/summary-data-sections.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 3 additions & 1 deletion apps/epp-replace/translations/src/en/pages.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{

"application-submitted": {
"confirmed": "Replaced application submitted"
}
}
13 changes: 13 additions & 0 deletions apps/epp-replace/views/application-submitted.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{<partials-page}}
{{$pageTitle}}
{{#t}}pages.application-submitted.confirmed{{/t}} &ndash; {{#t}}journey.serviceName{{/t}} &ndash; GOV.UK
{{/pageTitle}}
{{$page-content}}
<div class="govuk-panel alert-complete govuk-panel--confirmation">
<h1 class="govuk-panel__title">
{{#t}}pages.application-submitted.confirmed{{/t}}
</h1>
<h2 class="govuk-!-font-weight-regular govuk-!-margin-bottom-0">Payment successful</h2>
</div>
{{/page-content}}
{{/partials-page}}

0 comments on commit aa9279e

Please sign in to comment.