@defra-fish/gafl-webapp-service 1.57.0 → 1.58.0-rc.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra-fish/gafl-webapp-service",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0-rc.1",
|
|
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.
|
|
40
|
-
"@defra-fish/connectors-lib": "1.
|
|
39
|
+
"@defra-fish/business-rules-lib": "1.58.0-rc.1",
|
|
40
|
+
"@defra-fish/connectors-lib": "1.58.0-rc.1",
|
|
41
41
|
"@defra/hapi-gapi": "^2.0.0",
|
|
42
42
|
"@hapi/boom": "^9.1.2",
|
|
43
43
|
"@hapi/catbox-redis": "^6.0.2",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"./gafl-jest-matchers.js"
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e00aea1ef5780d2c91cc88c39483fd73bfdbc1fb"
|
|
84
84
|
}
|
package/src/locales/cy.json
CHANGED
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
"licence_type_byelaws": "is-ddeddfau pysgota lleol (yn agor ar dudalen newydd)",
|
|
483
483
|
"licence_type_error_choose": "Dewiswch un o’r mathau o drwyddedau pysgota",
|
|
484
484
|
"licence_type_na": "Nid oes cyfnodau byrrach ar gael ar gyfer y math hwn o drwydded.",
|
|
485
|
-
"licence_type_payment_edge_case": "Mae’n rhaid i chi gwblhau eich taliad cyn 11:30pm ar 31 Mawrth
|
|
485
|
+
"licence_type_payment_edge_case": "Mae’n rhaid i chi gwblhau eich taliad cyn 11:30pm ar 31 Mawrth 2025 i dalu’r pris a ddangosir",
|
|
486
486
|
"licence_type_radio_salmon_hint": "Mae'n cynnwys brithyllod a physgod bras (hyd at 3 gwialen)",
|
|
487
487
|
"licence_type_radio_salmon": "Eogiaid a brithyllod y môr",
|
|
488
488
|
"licence_type_radio_salmon_payment_summary": "Eogiaid a brithyllod y môr",
|
|
@@ -523,9 +523,8 @@
|
|
|
523
523
|
"new_prices_3_rod_table_heading": "Brithyllod a physgod bras (hyd at 3 gwialen)",
|
|
524
524
|
"new_prices_salmon_table_heading": "Eogiaid a brithyllod y môr",
|
|
525
525
|
"new_prices_column_1": "Hyd y drwydded",
|
|
526
|
-
"new_prices_column_2": "Cost hyd 31 Mawrth
|
|
527
|
-
"new_prices_column_3": "Cost o 1 Ebrill
|
|
528
|
-
"new_prices_column_4": "Cost o 1 Ebrill 2025",
|
|
526
|
+
"new_prices_column_2": "Cost hyd 31 Mawrth 2025",
|
|
527
|
+
"new_prices_column_3": "Cost o 1 Ebrill 2025",
|
|
529
528
|
"new_prices_row_1_day": "1 diwrnod",
|
|
530
529
|
"new_prices_row_8_day": "8 diwrnod",
|
|
531
530
|
"new_prices_row_12_month": "12 mis",
|
package/src/locales/en.json
CHANGED
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
"licence_type_byelaws": "local fishing byelaws (opens in new tab)",
|
|
485
485
|
"licence_type_error_choose": "Choose one of the fishing licence types",
|
|
486
486
|
"licence_type_na": "Shorter lengths are not available for this licence type",
|
|
487
|
-
"licence_type_payment_edge_case": "You must complete payment before 11:30pm on 31 March
|
|
487
|
+
"licence_type_payment_edge_case": "You must complete payment before 11:30pm on 31 March 2025 to get the price shown",
|
|
488
488
|
"licence_type_radio_salmon_hint": "Includes trout and coarse (up to 3 rods)",
|
|
489
489
|
"licence_type_radio_salmon": "Salmon and sea trout",
|
|
490
490
|
"licence_type_radio_salmon_payment_summary": "Salmon and sea trout",
|
|
@@ -525,9 +525,8 @@
|
|
|
525
525
|
"new_prices_3_rod_table_heading": "Trout and coarse fish licence (up to 3 rods)",
|
|
526
526
|
"new_prices_salmon_table_heading": "Salmon and sea trout licence",
|
|
527
527
|
"new_prices_column_1": "Licence length",
|
|
528
|
-
"new_prices_column_2": "Cost until 31 March
|
|
529
|
-
"new_prices_column_3": "Cost from 1 April
|
|
530
|
-
"new_prices_column_4": "Cost from 1 April 2025",
|
|
528
|
+
"new_prices_column_2": "Cost until 31 March 2025",
|
|
529
|
+
"new_prices_column_3": "Cost from 1 April 2025",
|
|
531
530
|
"new_prices_row_1_day": "1-day",
|
|
532
531
|
"new_prices_row_8_day": "8-day",
|
|
533
532
|
"new_prices_row_12_month": "12-month",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
captionClasses: 'govuk-table__caption--m',
|
|
16
16
|
classes: 'govuk-!-margin-top-7',
|
|
17
17
|
firstCellIsHeader: true,
|
|
18
|
-
head: [ { text: mssgs.new_prices_column_1 }, { text: mssgs.new_prices_column_2, format: 'numeric' }, { text: mssgs.new_prices_column_3, format: 'numeric' }
|
|
18
|
+
head: [ { text: mssgs.new_prices_column_1 }, { text: mssgs.new_prices_column_2, format: 'numeric' }, { text: mssgs.new_prices_column_3, format: 'numeric' } ],
|
|
19
19
|
rows: [
|
|
20
|
-
[ { text: mssgs.new_prices_row_1_day }, { text: '£
|
|
21
|
-
[ { text: mssgs.new_prices_row_8_day }, { text: '£
|
|
22
|
-
[ { text: mssgs.new_prices_row_12_month }, { text: '£
|
|
23
|
-
[ { text: mssgs.new_prices_row_concession }, { text: '£
|
|
24
|
-
[ { text: mssgs.new_prices_row_junior }, { text: mssgs.free, format: 'numeric' }, { text: mssgs.free, format: 'numeric' }
|
|
20
|
+
[ { text: mssgs.new_prices_row_1_day }, { text: '£7.10', format: 'numeric' }, { text: '£7.30', format: 'numeric' } ],
|
|
21
|
+
[ { text: mssgs.new_prices_row_8_day }, { text: '£14.30', format: 'numeric' }, { text: '£14.70', format: 'numeric' } ],
|
|
22
|
+
[ { text: mssgs.new_prices_row_12_month }, { text: '£35.80', format: 'numeric' }, { text: '£36.80', format: 'numeric' } ],
|
|
23
|
+
[ { text: mssgs.new_prices_row_concession }, { text: '£23.80', format: 'numeric' }, { text: '£24.50', format: 'numeric' } ],
|
|
24
|
+
[ { text: mssgs.new_prices_row_junior }, { text: mssgs.free, format: 'numeric' }, { text: mssgs.free, format: 'numeric' } ]
|
|
25
25
|
]
|
|
26
26
|
}) }}
|
|
27
27
|
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
captionClasses: 'govuk-table__caption--m',
|
|
31
31
|
classes: 'govuk-!-margin-top-7',
|
|
32
32
|
firstCellIsHeader: true,
|
|
33
|
-
head: [ { text: mssgs.new_prices_column_1 }, { text: mssgs.new_prices_column_2, format: 'numeric' }, { text: mssgs.new_prices_column_3, format: 'numeric' }
|
|
33
|
+
head: [ { text: mssgs.new_prices_column_1 }, { text: mssgs.new_prices_column_2, format: 'numeric' }, { text: mssgs.new_prices_column_3, format: 'numeric' } ],
|
|
34
34
|
rows: [
|
|
35
|
-
[ { text: mssgs.new_prices_row_12_month }, { text: '£
|
|
36
|
-
[ { text: mssgs.new_prices_row_concession }, { text: '£
|
|
37
|
-
[ { text: mssgs.new_prices_row_junior }, { text: mssgs.free, format: 'numeric' }, { text: mssgs.free, format: 'numeric' }
|
|
35
|
+
[ { text: mssgs.new_prices_row_12_month }, { text: '£53.70', format: 'numeric' }, { text: '£55.30', format: 'numeric' } ],
|
|
36
|
+
[ { text: mssgs.new_prices_row_concession }, { text: '£35.80', format: 'numeric' }, { text: '£36.80', format: 'numeric' } ],
|
|
37
|
+
[ { text: mssgs.new_prices_row_junior }, { text: mssgs.free, format: 'numeric' }, { text: mssgs.free, format: 'numeric' } ]
|
|
38
38
|
]
|
|
39
39
|
}) }}
|
|
40
40
|
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
captionClasses: 'govuk-table__caption--m',
|
|
44
44
|
classes: 'govuk-!-margin-top-7',
|
|
45
45
|
firstCellIsHeader: true,
|
|
46
|
-
head: [ { text: mssgs.new_prices_column_1 }, { text: mssgs.new_prices_column_2, format: 'numeric' }, { text: mssgs.new_prices_column_3, format: 'numeric' }
|
|
46
|
+
head: [ { text: mssgs.new_prices_column_1 }, { text: mssgs.new_prices_column_2, format: 'numeric' }, { text: mssgs.new_prices_column_3, format: 'numeric' } ],
|
|
47
47
|
rows: [
|
|
48
|
-
[ { text: mssgs.new_prices_row_1_day }, { text: '£
|
|
49
|
-
[ { text: mssgs.new_prices_row_8_day }, { text: '£
|
|
50
|
-
[ { text: mssgs.new_prices_row_12_month }, { text: '£
|
|
51
|
-
[ { text: mssgs.new_prices_row_concession }, { text: '£
|
|
52
|
-
[ { text: mssgs.new_prices_row_junior }, { text: mssgs.free, format: 'numeric' }, { text: mssgs.free, format: 'numeric' }
|
|
48
|
+
[ { text: mssgs.new_prices_row_1_day }, { text: '£13.20', format: 'numeric' }, { text: '£13.50', format: 'numeric' } ],
|
|
49
|
+
[ { text: mssgs.new_prices_row_8_day }, { text: '£29.70', format: 'numeric' }, { text: '£30.50', format: 'numeric' } ],
|
|
50
|
+
[ { text: mssgs.new_prices_row_12_month }, { text: '£90.40', format: 'numeric' }, { text: '£93.10', format: 'numeric' } ],
|
|
51
|
+
[ { text: mssgs.new_prices_row_concession }, { text: '£60.20', format: 'numeric' }, { text: '£62', format: 'numeric' } ],
|
|
52
|
+
[ { text: mssgs.new_prices_row_junior }, { text: mssgs.free, format: 'numeric' }, { text: mssgs.free, format: 'numeric' } ]
|
|
53
53
|
]
|
|
54
54
|
}) }}
|
|
55
55
|
</div>
|
|
@@ -564,18 +564,18 @@ describe('The pricing summary calculator', () => {
|
|
|
564
564
|
describe('shouldDisplayPriceChangePaymentWarningMessage', () => {
|
|
565
565
|
it.each`
|
|
566
566
|
permission | currentDateTime | length | expected | licence | dateTime
|
|
567
|
-
${getAdultPermission()} | ${moment.utc('
|
|
568
|
-
${getAdultPermission()} | ${moment.utc('
|
|
569
|
-
${getAdultPermission()} | ${moment.utc('
|
|
570
|
-
${getJuniorPermission()} | ${moment.utc('
|
|
571
|
-
${getAdultPermission()} | ${moment.utc('
|
|
572
|
-
${getAdultPermission()} | ${moment.utc('
|
|
573
|
-
${getAdultPermission()} | ${moment.utc('
|
|
574
|
-
${getJuniorPermission()} | ${moment.utc('
|
|
575
|
-
${getAdultPermission()} | ${moment.utc('
|
|
576
|
-
${getAdultPermission()} | ${moment.utc('
|
|
577
|
-
${getAdultPermission()} | ${moment.utc('
|
|
578
|
-
${getJuniorPermission()} | ${moment.utc('
|
|
567
|
+
${getAdultPermission()} | ${moment.utc('2025-03-25T23:59Z')} | ${'12M'} | ${undefined} | ${'12 month adult licence'} | ${'before start date'}
|
|
568
|
+
${getAdultPermission()} | ${moment.utc('2025-04-02T00:01Z')} | ${'12M'} | ${undefined} | ${'12 month adult licence'} | ${'after end date'}
|
|
569
|
+
${getAdultPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'12M'} | ${'payment-edge-case'} | ${'12 month adult licence'} | ${'within range'}
|
|
570
|
+
${getJuniorPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'12M'} | ${undefined} | ${'12 month junior licence'} | ${'within range'}
|
|
571
|
+
${getAdultPermission()} | ${moment.utc('2025-03-25T23:59Z')} | ${'8D'} | ${undefined} | ${'8 day adult licence'} | ${'before start date'}
|
|
572
|
+
${getAdultPermission()} | ${moment.utc('2025-04-02T00:01Z')} | ${'8D'} | ${undefined} | ${'8 day adult licence'} | ${'after end date'}
|
|
573
|
+
${getAdultPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'8D'} | ${'payment-edge-case'} | ${'8 day adult licence'} | ${'within range'}
|
|
574
|
+
${getJuniorPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'8D'} | ${undefined} | ${'8 day junior licence'} | ${'within range'}
|
|
575
|
+
${getAdultPermission()} | ${moment.utc('2025-03-25T23:59Z')} | ${'1D'} | ${undefined} | ${'1 day adult licence'} | ${'before start date'}
|
|
576
|
+
${getAdultPermission()} | ${moment.utc('2025-04-02T00:01Z')} | ${'1D'} | ${undefined} | ${'1 day adult licence'} | ${'after end date'}
|
|
577
|
+
${getAdultPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'1D'} | ${'payment-edge-case'} | ${'1 day adult licence'} | ${'within range'}
|
|
578
|
+
${getJuniorPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'1D'} | ${undefined} | ${'1 day junior licence'} | ${'within range'}
|
|
579
579
|
`(
|
|
580
580
|
'returns $expected for payment_msg for $licence when current date and time is $dateTime for displaying price change payment warning message',
|
|
581
581
|
async ({ permission, currentDateTime, expected }) => {
|
|
@@ -588,18 +588,18 @@ describe('The pricing summary calculator', () => {
|
|
|
588
588
|
|
|
589
589
|
it.each`
|
|
590
590
|
permission | currentDateTime | type | expected | licence | dateTime
|
|
591
|
-
${getAdultPermission()} | ${moment.utc('
|
|
592
|
-
${getAdultPermission()} | ${moment.utc('
|
|
593
|
-
${getAdultPermission()} | ${moment.utc('
|
|
594
|
-
${getJuniorPermission()} | ${moment.utc('
|
|
595
|
-
${getAdultPermission()} | ${moment.utc('
|
|
596
|
-
${getAdultPermission()} | ${moment.utc('
|
|
597
|
-
${getAdultPermission()} | ${moment.utc('
|
|
598
|
-
${getJuniorPermission()} | ${moment.utc('
|
|
599
|
-
${getAdultPermission()} | ${moment.utc('
|
|
600
|
-
${getAdultPermission()} | ${moment.utc('
|
|
601
|
-
${getAdultPermission()} | ${moment.utc('
|
|
602
|
-
${getJuniorPermission()} | ${moment.utc('
|
|
591
|
+
${getAdultPermission()} | ${moment.utc('2025-03-25T23:59Z')} | ${'salmon-and-sea-trout'} | ${undefined} | ${'adult salmon licence'} | ${'before start date'}
|
|
592
|
+
${getAdultPermission()} | ${moment.utc('2025-04-02T00:01Z')} | ${'salmon-and-sea-trout'} | ${undefined} | ${'adult salmon licence'} | ${'after end date'}
|
|
593
|
+
${getAdultPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'salmon-and-sea-trout'} | ${'payment-edge-case'} | ${'adult salmon licence'} | ${'within range'}
|
|
594
|
+
${getJuniorPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'salmon-and-sea-trout'} | ${undefined} | ${'junior salmon licence'} | ${'within range'}
|
|
595
|
+
${getAdultPermission()} | ${moment.utc('2025-03-25T23:59Z')} | ${'trout-and-coarse-2-rod'} | ${undefined} | ${'adult 2 rod licence'} | ${'before start date'}
|
|
596
|
+
${getAdultPermission()} | ${moment.utc('2025-04-02T00:01Z')} | ${'trout-and-coarse-2-rod'} | ${undefined} | ${'adult 2 rod licence'} | ${'after end date'}
|
|
597
|
+
${getAdultPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'trout-and-coarse-2-rod'} | ${'payment-edge-case'} | ${'adult 2 rod licence'} | ${'within range'}
|
|
598
|
+
${getJuniorPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'trout-and-coarse-2-rod'} | ${undefined} | ${'junior 2 rod licence'} | ${'within range'}
|
|
599
|
+
${getAdultPermission()} | ${moment.utc('2025-03-25T23:59Z')} | ${'trout-and-coarse-3-rod'} | ${undefined} | ${'adult 3 rod licence'} | ${'before start date'}
|
|
600
|
+
${getAdultPermission()} | ${moment.utc('2025-04-02T00:01Z')} | ${'trout-and-coarse-3-rod'} | ${undefined} | ${'adult 3 rod licence'} | ${'after end date'}
|
|
601
|
+
${getAdultPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'trout-and-coarse-3-rod'} | ${'payment-edge-case'} | ${'adult 3 rod licence'} | ${'within range'}
|
|
602
|
+
${getJuniorPermission()} | ${moment.utc('2025-04-01T00:01Z')} | ${'trout-and-coarse-3-rod'} | ${undefined} | ${'junior 3 rod licence'} | ${'within range'}
|
|
603
603
|
`(
|
|
604
604
|
'returns $expected for payment_msg for $licence when current date and time is $dateTime for displaying price change payment warning message',
|
|
605
605
|
async ({ permission, currentDateTime, type, expected }) => {
|
|
@@ -612,22 +612,22 @@ describe('The pricing summary calculator', () => {
|
|
|
612
612
|
|
|
613
613
|
it.each`
|
|
614
614
|
date | concessions | expected | dateTime | licence
|
|
615
|
-
${new Date('
|
|
616
|
-
${new Date('
|
|
617
|
-
${new Date('
|
|
618
|
-
${new Date('
|
|
619
|
-
${new Date('
|
|
620
|
-
${new Date('
|
|
621
|
-
${new Date('
|
|
622
|
-
${new Date('
|
|
623
|
-
${new Date('
|
|
624
|
-
${new Date('
|
|
625
|
-
${new Date('
|
|
626
|
-
${new Date('
|
|
627
|
-
${new Date('
|
|
628
|
-
${new Date('
|
|
629
|
-
${new Date('
|
|
630
|
-
${new Date('
|
|
615
|
+
${new Date('2025-03-25T23:59Z')} | ${[]} | ${false} | ${'before start date'} | ${'an adult licence'}
|
|
616
|
+
${new Date('2025-04-04T01:00Z')} | ${[]} | ${false} | ${'after start date'} | ${'an adult licence'}
|
|
617
|
+
${new Date('2025-03-30T23:58Z')} | ${[]} | ${false} | ${'same date but before time'} | ${'an adult licence'}
|
|
618
|
+
${new Date('2025-04-01T00:04Z')} | ${[]} | ${false} | ${'same date but after time'} | ${'an adult licence'}
|
|
619
|
+
${new Date('2025-03-30T23:59Z')} | ${[]} | ${true} | ${'start of range'} | ${'an adult licence'}
|
|
620
|
+
${new Date('2025-04-01T00:00Z')} | ${[]} | ${true} | ${'within range'} | ${'an adult licence'}
|
|
621
|
+
${new Date('2025-04-01T00:01Z')} | ${[]} | ${true} | ${'end of range'} | ${'an adult licence'}
|
|
622
|
+
${new Date('2025-03-30T23:59Z')} | ${['Junior']} | ${false} | ${'start of range'} | ${'a junior licence'}
|
|
623
|
+
${new Date('2025-04-01T00:00Z')} | ${['Junior']} | ${false} | ${'within range'} | ${'a junior licence'}
|
|
624
|
+
${new Date('2025-04-01T00:01Z')} | ${['Junior']} | ${false} | ${'end of range'} | ${'a junior licence'}
|
|
625
|
+
${new Date('2025-03-30T23:59Z')} | ${['Senior']} | ${true} | ${'start of range'} | ${'a senior licence'}
|
|
626
|
+
${new Date('2025-04-01T00:00Z')} | ${['Senior']} | ${true} | ${'within range'} | ${'a senior licence'}
|
|
627
|
+
${new Date('2025-04-01T00:01Z')} | ${['Senior']} | ${true} | ${'end of range'} | ${'a senior licence'}
|
|
628
|
+
${new Date('2025-03-30T23:59Z')} | ${['Disabled']} | ${true} | ${'start of range'} | ${'a disabled licence'}
|
|
629
|
+
${new Date('2025-04-01T00:00Z')} | ${['Disabled']} | ${true} | ${'within range'} | ${'a disabled licence'}
|
|
630
|
+
${new Date('2025-04-01T00:01Z')} | ${['Disabled']} | ${true} | ${'end of range'} | ${'a disabled licence'}
|
|
631
631
|
`('returns $expected when we have $licence and current date and time is $dateTime', ({ date, concessions, expected }) => {
|
|
632
632
|
moment.now = () => moment(date)
|
|
633
633
|
const result = shouldDisplayPriceChangePaymentWarningMessage(concessions)
|
|
@@ -73,8 +73,8 @@ export const shouldDisplayPriceChangePaymentWarningMessage = concessions => {
|
|
|
73
73
|
if (concessions.includes('Junior')) {
|
|
74
74
|
return false
|
|
75
75
|
}
|
|
76
|
-
const startRange = moment('
|
|
77
|
-
const endRange = moment('
|
|
76
|
+
const startRange = moment('2025-03-30T23:59:00Z')
|
|
77
|
+
const endRange = moment('2025-04-01T00:01:00Z')
|
|
78
78
|
|
|
79
79
|
return now.isBetween(startRange, endRange, null, '[]')
|
|
80
80
|
}
|