@defra-fish/gafl-webapp-service 1.61.0-rc.4 → 1.61.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -5
- package/src/locales/cy.json +2 -5
- package/src/locales/en.json +2 -5
- package/src/pages/licence-details/licence-to-start/licence-to-start.njk +0 -55
- package/src/pages/order-complete/order-complete/__tests__/__snapshots__/order-complete.spec.js.snap +9 -18
- package/src/pages/order-complete/order-complete/__tests__/order-complete.spec.js +2 -4
- package/src/pages/order-complete/order-complete/order-complete.njk +1 -1
- package/src/pages/order-complete/order-complete/route.js +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra-fish/gafl-webapp-service",
|
|
3
|
-
"version": "1.61.0-rc.
|
|
3
|
+
"version": "1.61.0-rc.6",
|
|
4
4
|
"description": "The websales frontend for the GAFL service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"prepare": "gulp --gulpfile build/gulpfile.cjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@defra-fish/business-rules-lib": "1.61.0-rc.
|
|
40
|
-
"@defra-fish/connectors-lib": "1.61.0-rc.
|
|
39
|
+
"@defra-fish/business-rules-lib": "1.61.0-rc.6",
|
|
40
|
+
"@defra-fish/connectors-lib": "1.61.0-rc.6",
|
|
41
41
|
"@defra/hapi-gapi": "^2.0.0",
|
|
42
42
|
"@hapi/boom": "^9.1.2",
|
|
43
43
|
"@hapi/catbox-redis": "^6.0.2",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"debug": "^4.3.3",
|
|
53
53
|
"disinfect": "^1.1.0",
|
|
54
54
|
"find": "^0.3.0",
|
|
55
|
-
"flatpickr": "^4.6.9",
|
|
56
55
|
"govuk-frontend": "^5.2.0",
|
|
57
56
|
"hapi-i18n": "^3.0.1",
|
|
58
57
|
"joi": "^17.6.0",
|
|
@@ -80,5 +79,5 @@
|
|
|
80
79
|
"./gafl-jest-matchers.js"
|
|
81
80
|
]
|
|
82
81
|
},
|
|
83
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "38a3dd7bb9c0b5331ef38530b7a2ddc0de8ecfa4"
|
|
84
83
|
}
|
package/src/locales/cy.json
CHANGED
|
@@ -552,11 +552,8 @@
|
|
|
552
552
|
"order_complete_before_leave_page_bulletpoint_2_link": "darllen yr adroddiad blynyddol pysgodfeydd ar gyfer Lloegr (yn agor mewn tab newydd)",
|
|
553
553
|
"order_complete_before_leave_page_paragraph": "Efallai yr hoffech:",
|
|
554
554
|
"order_complete_before_leave_page_title": "Cyn i chi adael y dudalen hon",
|
|
555
|
-
"
|
|
556
|
-
"
|
|
557
|
-
"order_complete_future_payments_link": "ganslo’r taliad ar gyfer trwyddedau yn y dyfodol nawr ",
|
|
558
|
-
"order_complete_future_payments_postal_paragraph_1": "Byddwch yn derbyn llythyr yn cadarnhau eich cytundeb taliad cerdyn sy’n ailadrodd. Os ydych chi wedi newid eich meddwl, gallwch ",
|
|
559
|
-
"order_complete_future_payments_postal_paragraph_2": " neu ganslo’n ddiweddarach gan ddefnyddio'r manylion yn y llythyr.",
|
|
555
|
+
"order_complete_future_payments_digital_paragraph": "Byddwch yn derbyn e-bost neu neges destun yn fuan yn cadarnhau eich cytundeb taliad cerdyn sy’n ailadrodd. Os ydych chi wedi newid eich meddwl, gallwch ganslo taliadau trwyddedau ar gyfer y dyfodol gan ddefnyddio’r manylion yn yr e-bost neu’r neges.",
|
|
556
|
+
"order_complete_future_payments_postal_paragraph": "Byddwch yn derbyn llythyr yn cadarnhau eich cytundeb taliad cerdyn sy’n ailadrodd. Os ydych chi wedi newid eich meddwl, gallwch ganslo taliadau trwyddedau ar gyfer y dyfodol gan ddefnyddio’r manylion yn eich llythyr.",
|
|
560
557
|
"order_complete_future_payments_title": "Taliadau am drwyddedau yn y dyfodol",
|
|
561
558
|
"order_complete_licence_details_bobo_digital_paragraph": "Bydd y drwydded hefyd yn cael ei hanfon ar ffurf e-bost neu neges destun.",
|
|
562
559
|
"order_complete_licence_details_bobo_digital_confirmation_paragraph": "Bydd manylion y drwydded yn cael eu hanfon ar ffurf e-bost neu neges destun.",
|
package/src/locales/en.json
CHANGED
|
@@ -555,11 +555,8 @@
|
|
|
555
555
|
"order_complete_before_leave_page_bulletpoint_2_link": "read the latest fisheries annual report for England (opens in new tab)",
|
|
556
556
|
"order_complete_before_leave_page_paragraph": "You may like to:",
|
|
557
557
|
"order_complete_before_leave_page_title": "Before you leave this page",
|
|
558
|
-
"
|
|
559
|
-
"
|
|
560
|
-
"order_complete_future_payments_link": "cancel the future licence payments now",
|
|
561
|
-
"order_complete_future_payments_postal_paragraph_1": "You will get a letter confirming your recurring card payment agreement. If you have changed your mind, you can ",
|
|
562
|
-
"order_complete_future_payments_postal_paragraph_2": " or cancel later using the details in the letter.",
|
|
558
|
+
"order_complete_future_payments_digital_paragraph": "You will shortly get an email or text message confirming your recurring card payment agreement. If you have changed your mind, you can cancel the future licence payments using the details in the email or text message.",
|
|
559
|
+
"order_complete_future_payments_postal_paragraph": "You will get a letter confirming your recurring card payment agreement. If you have changed your mind, you can cancel the future licence payments using the details in your letter.",
|
|
563
560
|
"order_complete_future_payments_title": "Future licence payments",
|
|
564
561
|
"order_complete_licence_details_bobo_digital_paragraph": "The licence will also be sent by email or text message.",
|
|
565
562
|
"order_complete_licence_details_bobo_digital_confirmation_paragraph": "Licence details will also be sent by email or text message.",
|
|
@@ -118,59 +118,4 @@
|
|
|
118
118
|
import { initAll } from '/public/javascript/govuk-frontend-min.js'
|
|
119
119
|
initAll()
|
|
120
120
|
</script>
|
|
121
|
-
<script src="/public/javascript/flatpickr-min.js"></script>
|
|
122
|
-
<script nonce="{{nonce}}">(function () {
|
|
123
|
-
const dataInputDiv = document.getElementById('licence-start-date')
|
|
124
|
-
const calImageDiv = document.createElement('div')
|
|
125
|
-
calImageDiv.id = 'cal-image-div'
|
|
126
|
-
const calImage = document.createElement('img')
|
|
127
|
-
calImage.src = '/public/images/icon-calendar-2x.png'
|
|
128
|
-
calImage.alt = '{{ mssgs.licence_date_picker }}'
|
|
129
|
-
calImageDiv.appendChild(calImage)
|
|
130
|
-
calImageDiv.setAttribute('aria-hidden', true)
|
|
131
|
-
dataInputDiv.appendChild(calImageDiv)
|
|
132
|
-
const fpk = flatpickr(calImageDiv, {
|
|
133
|
-
dateFormat: "d m Y",
|
|
134
|
-
disableMobile: true,
|
|
135
|
-
minDate: 'today',
|
|
136
|
-
maxDate: '{{ data.maxStartDate }}',
|
|
137
|
-
position: 'below',
|
|
138
|
-
monthSelectorType: 'static',
|
|
139
|
-
showMonths: 1,
|
|
140
|
-
clickOpens: false,
|
|
141
|
-
ariaDateFormat: "",
|
|
142
|
-
onChange: function(selectedDates, dateStr, instance) {
|
|
143
|
-
var d = new Date(selectedDates[0])
|
|
144
|
-
document.getElementById('licence-start-date-day').value = d.getDate()
|
|
145
|
-
document.getElementById('licence-start-date-month').value = d.getMonth() + 1
|
|
146
|
-
document.getElementById('licence-start-date-year').value = d.getFullYear()
|
|
147
|
-
},
|
|
148
|
-
onOpen: [ function(selectedDates, dateStr, instance) {
|
|
149
|
-
if (!document.getElementById('year-read-only')) {
|
|
150
|
-
const yearInputWrapper = document.getElementsByClassName('numInputWrapper')[0];
|
|
151
|
-
yearInputWrapper.style.display= 'none';
|
|
152
|
-
const currentMonthDiv = document.getElementsByClassName('flatpickr-current-month')[0];
|
|
153
|
-
const yearReadOnly = document.createElement('span');
|
|
154
|
-
yearReadOnly.id = 'year-read-only';
|
|
155
|
-
yearReadOnly.innerHTML = ' ' + instance.currentYear;
|
|
156
|
-
currentMonthDiv.appendChild(yearReadOnly);
|
|
157
|
-
}
|
|
158
|
-
} ],
|
|
159
|
-
onYearChange: function(selectedDates, dateStr, instance) {
|
|
160
|
-
const yearReadOnly = document.getElementById('year-read-only');
|
|
161
|
-
yearReadOnly.innerHTML = ' ' + instance.currentYear;
|
|
162
|
-
}
|
|
163
|
-
})
|
|
164
|
-
window.addEventListener('keydown', function (event) {
|
|
165
|
-
if (event.defaultPrevented) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (event.key === 'Esc' || event.key === 'Escape' ) {
|
|
169
|
-
fpk.close()
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
calImageDiv.onclick = function() {
|
|
173
|
-
fpk.toggle()
|
|
174
|
-
}
|
|
175
|
-
})()</script>
|
|
176
121
|
{% endblock %}
|
package/src/pages/order-complete/order-complete/__tests__/__snapshots__/order-complete.spec.js.snap
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`The order completion handler 8 day licence sets as non_postal 1`] = `
|
|
4
4
|
Object {
|
|
5
|
-
"
|
|
6
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
5
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
7
6
|
"licenceDetailsDigitalParagraph": "fishing self digital confirmation licence details",
|
|
8
7
|
"licenceDetailsParagraphTwo": "paragraph self licence details",
|
|
9
8
|
"licenceTitle": "title self licence details",
|
|
@@ -16,8 +15,7 @@ Object {
|
|
|
16
15
|
|
|
17
16
|
exports[`The order completion handler 12 month digital licence for someone else 1`] = `
|
|
18
17
|
Object {
|
|
19
|
-
"
|
|
20
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
18
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
21
19
|
"licenceDetailsDigitalParagraph": "fishing bobo digital licence details",
|
|
22
20
|
"licenceDetailsParagraphTwo": "paragraph bobo licence details",
|
|
23
21
|
"licenceTitle": "title bobo licence details",
|
|
@@ -30,8 +28,7 @@ Object {
|
|
|
30
28
|
|
|
31
29
|
exports[`The order completion handler 12 month digital licence for you 1`] = `
|
|
32
30
|
Object {
|
|
33
|
-
"
|
|
34
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
31
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
35
32
|
"licenceDetailsDigitalParagraph": "fishing self digital licence details",
|
|
36
33
|
"licenceDetailsParagraphTwo": "paragraph self licence details",
|
|
37
34
|
"licenceTitle": "title self licence details",
|
|
@@ -44,8 +41,7 @@ Object {
|
|
|
44
41
|
|
|
45
42
|
exports[`The order completion handler 12 month postal licence for someone else with digital confirmation 1`] = `
|
|
46
43
|
Object {
|
|
47
|
-
"
|
|
48
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
44
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
49
45
|
"licenceDetailsDigitalParagraph": "fishing bobo digital confirmation licence details",
|
|
50
46
|
"licenceDetailsParagraphTwo": "paragraph bobo licence details",
|
|
51
47
|
"licenceTitle": "title bobo licence details",
|
|
@@ -58,8 +54,7 @@ Object {
|
|
|
58
54
|
|
|
59
55
|
exports[`The order completion handler 12 month postal licence for someone else with none digital confirmation 1`] = `
|
|
60
56
|
Object {
|
|
61
|
-
"
|
|
62
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
57
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
63
58
|
"licenceDetailsDigitalParagraph": undefined,
|
|
64
59
|
"licenceDetailsParagraphTwo": "paragraph bobo licence details",
|
|
65
60
|
"licenceTitle": "title bobo licence details",
|
|
@@ -72,8 +67,7 @@ Object {
|
|
|
72
67
|
|
|
73
68
|
exports[`The order completion handler 12 month postal licence for you with digital confirmation 1`] = `
|
|
74
69
|
Object {
|
|
75
|
-
"
|
|
76
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
70
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
77
71
|
"licenceDetailsDigitalParagraph": "fishing self digital confirmation licence details",
|
|
78
72
|
"licenceDetailsParagraphTwo": "paragraph self licence details",
|
|
79
73
|
"licenceTitle": "title self licence details",
|
|
@@ -86,8 +80,7 @@ Object {
|
|
|
86
80
|
|
|
87
81
|
exports[`The order completion handler 12 month postal licence for you with none digital confirmation 1`] = `
|
|
88
82
|
Object {
|
|
89
|
-
"
|
|
90
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
83
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
91
84
|
"licenceDetailsDigitalParagraph": undefined,
|
|
92
85
|
"licenceDetailsParagraphTwo": "paragraph self licence details",
|
|
93
86
|
"licenceTitle": "title self licence details",
|
|
@@ -100,8 +93,7 @@ Object {
|
|
|
100
93
|
|
|
101
94
|
exports[`The order completion handler 12 month recurring payment with digital reminder 1`] = `
|
|
102
95
|
Object {
|
|
103
|
-
"
|
|
104
|
-
"futurePaymentsParagraphTwo": "future payments digital two",
|
|
96
|
+
"futurePaymentsParagraph": "future payments digital",
|
|
105
97
|
"licenceDetailsDigitalParagraph": "fishing self digital licence details",
|
|
106
98
|
"licenceDetailsParagraphTwo": "paragraph self licence details",
|
|
107
99
|
"licenceTitle": "title self licence details",
|
|
@@ -114,8 +106,7 @@ Object {
|
|
|
114
106
|
|
|
115
107
|
exports[`The order completion handler 12 month recurring payment with postal reminder 1`] = `
|
|
116
108
|
Object {
|
|
117
|
-
"
|
|
118
|
-
"futurePaymentsParagraphTwo": "future payments postal two",
|
|
109
|
+
"futurePaymentsParagraph": "future payments postal",
|
|
119
110
|
"licenceDetailsDigitalParagraph": "fishing self digital licence details",
|
|
120
111
|
"licenceDetailsParagraphTwo": "paragraph self licence details",
|
|
121
112
|
"licenceTitle": "title self licence details",
|
|
@@ -99,10 +99,8 @@ const getMessages = () => ({
|
|
|
99
99
|
order_complete_when_fishing_bobo_postal_digital: 'fishing bobo postal digital when fishing',
|
|
100
100
|
order_complete_when_fishing_self_non_postal_digital: 'fishing self non postal digital when fishing',
|
|
101
101
|
order_complete_when_fishing_bobo_non_postal_digital: 'fishing bobo non postal digital when fishing',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
order_complete_future_payments_postal_paragraph_1: 'future payments postal one',
|
|
105
|
-
order_complete_future_payments_postal_paragraph_2: 'future payments postal two'
|
|
102
|
+
order_complete_future_payments_digital_paragraph: 'future payments digital',
|
|
103
|
+
order_complete_future_payments_postal_paragraph: 'future payments postal'
|
|
106
104
|
})
|
|
107
105
|
|
|
108
106
|
const getSampleRequest = ({
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
{% if (data.recurringPayment) %}
|
|
31
31
|
<h2 class="govuk-heading-m">{{ mssgs.order_complete_future_payments_title }}</h2>
|
|
32
|
-
<p class="govuk-body">{{ data.content.
|
|
32
|
+
<p class="govuk-body">{{ data.content.futurePaymentsParagraph }}</p>
|
|
33
33
|
{% endif %}
|
|
34
34
|
|
|
35
35
|
<h2 class="govuk-heading-m">{{ mssgs.order_complete_when_fishing_title }}</h2>
|
|
@@ -94,13 +94,9 @@ const getOrderCompleteContent = (permission, mssgs, transaction) => {
|
|
|
94
94
|
? mssgs.order_complete_when_fishing_self_postal_non_digital_2
|
|
95
95
|
: mssgs.order_complete_when_fishing_bobo_postal_non_digital_2,
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
? mssgs.
|
|
99
|
-
: mssgs.
|
|
100
|
-
|
|
101
|
-
futurePaymentsParagraphTwo: digitalReminder(permission)
|
|
102
|
-
? mssgs.order_complete_future_payments_digital_paragraph_2
|
|
103
|
-
: mssgs.order_complete_future_payments_postal_paragraph_2
|
|
97
|
+
futurePaymentsParagraph: digitalReminder(permission)
|
|
98
|
+
? mssgs.order_complete_future_payments_digital_paragraph
|
|
99
|
+
: mssgs.order_complete_future_payments_postal_paragraph
|
|
104
100
|
}
|
|
105
101
|
}
|
|
106
102
|
|