@defra/fcp-sfd-frontend-engine 0.37.1 → 0.38.0
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/.nvmrc +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +4 -1
- package/src/presenters/address-presenter.js +4 -4
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v24.22.1
|
package/dist/index.cjs
CHANGED
|
@@ -1531,13 +1531,13 @@ var sortErrorsBySectionOrder = (errors, orderedSectionsToFix, SECTION_FIELD_ORDE
|
|
|
1531
1531
|
var addressChangeLink = (postcodeLookup, context) => {
|
|
1532
1532
|
if (context === "business") {
|
|
1533
1533
|
if (postcodeLookup) {
|
|
1534
|
-
return "/business-address-
|
|
1534
|
+
return "/business-address-select";
|
|
1535
1535
|
}
|
|
1536
1536
|
return "/business-address-enter";
|
|
1537
1537
|
}
|
|
1538
1538
|
if (context === "personal") {
|
|
1539
1539
|
if (postcodeLookup) {
|
|
1540
|
-
return "/account-address-
|
|
1540
|
+
return "/account-address-select";
|
|
1541
1541
|
}
|
|
1542
1542
|
return "/account-address-enter";
|
|
1543
1543
|
}
|
package/dist/index.js
CHANGED
|
@@ -1490,13 +1490,13 @@ var sortErrorsBySectionOrder = (errors, orderedSectionsToFix, SECTION_FIELD_ORDE
|
|
|
1490
1490
|
var addressChangeLink = (postcodeLookup, context) => {
|
|
1491
1491
|
if (context === "business") {
|
|
1492
1492
|
if (postcodeLookup) {
|
|
1493
|
-
return "/business-address-
|
|
1493
|
+
return "/business-address-select";
|
|
1494
1494
|
}
|
|
1495
1495
|
return "/business-address-enter";
|
|
1496
1496
|
}
|
|
1497
1497
|
if (context === "personal") {
|
|
1498
1498
|
if (postcodeLookup) {
|
|
1499
|
-
return "/account-address-
|
|
1499
|
+
return "/account-address-select";
|
|
1500
1500
|
}
|
|
1501
1501
|
return "/account-address-enter";
|
|
1502
1502
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra/fcp-sfd-frontend-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Shared frontend engine used by both the internal and external frontend applications.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=24.22.1"
|
|
8
|
+
},
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
11
|
"import": "./dist/index.js",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Determines the correct link for changing an address.
|
|
3
3
|
*
|
|
4
4
|
* If the user previously selected an address from a postcode lookup, they will
|
|
5
|
-
* navigate to the address
|
|
6
|
-
* Otherwise, they navigate to the manual address entry page.
|
|
5
|
+
* navigate to the address selection page to choose a different address from the
|
|
6
|
+
* same lookup results. Otherwise, they navigate to the manual address entry page.
|
|
7
7
|
*
|
|
8
8
|
* @param {boolean} postcodeLookup - Whether the user used a postcode lookup to find their address
|
|
9
9
|
* @param {string} context - The context for the address change ('business' or 'personal')
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
export const addressChangeLink = (postcodeLookup, context) => {
|
|
13
13
|
if (context === 'business') {
|
|
14
14
|
if (postcodeLookup) {
|
|
15
|
-
return '/business-address-
|
|
15
|
+
return '/business-address-select'
|
|
16
16
|
}
|
|
17
17
|
return '/business-address-enter'
|
|
18
18
|
}
|
|
19
19
|
if (context === 'personal') {
|
|
20
20
|
if (postcodeLookup) {
|
|
21
|
-
return '/account-address-
|
|
21
|
+
return '/account-address-select'
|
|
22
22
|
}
|
|
23
23
|
return '/account-address-enter'
|
|
24
24
|
}
|