@companieshouse/ch-node-utils 1.3.15 → 1.3.16
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/README.md
CHANGED
|
@@ -108,6 +108,7 @@ The macro requires the following parameters:
|
|
|
108
108
|
- `lang`: An object containing language-specific strings for localization
|
|
109
109
|
- `displayAuthorisedAgent`: A flag for displaying the "Authorised agent" menu item. If the logged user has ACSP membership, this flag should be set to `'yes'`. If your service uses i18 middleware provided in the `@companieshouse/ch-node-utils` package, then this flag will be set to the correct value automatically. If not, you can use `isAuthorisedAgent` function from `./utils/sessionUtils`.
|
|
110
110
|
- `displayYourCompanies`: A flag for displaying the "Your companies" menu item. It should be set to `'yes` if this menu iten needs to be displayed.
|
|
111
|
+
- `displayUserManagementAdmin`: A flag for displaying the "User management admin" menu item. It should be set to `'yes` if this menu iten needs to be displayed.
|
|
111
112
|
|
|
112
113
|
#### Localization
|
|
113
114
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mainNavbar": "Y prif far llywio",
|
|
3
|
-
"clickToExpandOrCollapse": "Cliciwch i ehangu neu gwympo",
|
|
4
|
-
"signInOrRegister": "Mewngofnodwch / Cofrestrwch",
|
|
5
|
-
"yourCompanies": "Eich cwmnïau",
|
|
6
2
|
"authorisedAgent": "Asiant awdurdodedig",
|
|
7
|
-
"yourFilings": "Eich ffeilio",
|
|
8
|
-
"companiesYouFollow": "Cwmnïau rydych yn dilyn",
|
|
9
3
|
"basket": "Basged",
|
|
4
|
+
"clickToExpandOrCollapse": "Cliciwch i ehangu neu gwympo",
|
|
5
|
+
"companiesYouFollow": "Cwmnïau rydych yn dilyn",
|
|
6
|
+
"mainNavbar": "Y prif far llywio",
|
|
10
7
|
"manageAccount": "Rheoli cyfrif",
|
|
11
|
-
"
|
|
8
|
+
"signInOrRegister": "Mewngofnodwch / Cofrestrwch",
|
|
9
|
+
"signOut": "Allgofnodi",
|
|
10
|
+
"userManagementAdmin": "Gweinyddwr rheoli defnyddwyr",
|
|
11
|
+
"yourCompanies": "Eich cwmnïau",
|
|
12
|
+
"yourFilings": "Eich ffeilio"
|
|
12
13
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mainNavbar": "Menu",
|
|
3
|
-
"clickToExpandOrCollapse": "Select to show or hide",
|
|
4
|
-
"signInOrRegister": "Sign in / Register",
|
|
5
|
-
"yourCompanies": "Your companies",
|
|
6
2
|
"authorisedAgent": "Authorised agent",
|
|
7
|
-
"yourFilings": "Your filings",
|
|
8
|
-
"companiesYouFollow": "Companies you follow",
|
|
9
3
|
"basket": "Basket",
|
|
4
|
+
"clickToExpandOrCollapse": "Select to show or hide",
|
|
5
|
+
"companiesYouFollow": "Companies you follow",
|
|
6
|
+
"mainNavbar": "Menu",
|
|
10
7
|
"manageAccount": "Manage account",
|
|
11
|
-
"
|
|
8
|
+
"signInOrRegister": "Sign in / Register",
|
|
9
|
+
"signOut": "Sign out",
|
|
10
|
+
"userManagementAdmin": "User management admin",
|
|
11
|
+
"yourCompanies": "Your companies",
|
|
12
|
+
"yourFilings": "Your filings"
|
|
12
13
|
}
|
package/package.json
CHANGED
package/templates/navbar.njk
CHANGED
|
@@ -61,9 +61,11 @@ It receives:
|
|
|
61
61
|
- lang: an object containing language-specific strings for localization
|
|
62
62
|
- displayAuthorisedAgent: a flag indicating whether to display the 'Authorised agent' menu item
|
|
63
63
|
- displayYourCompanies: a flag indicating whether to display the 'Your companies' menu item
|
|
64
|
+
- displayUserManagementAdmin: a flag indicating whether to display the 'User management admin' menu item
|
|
64
65
|
#}
|
|
65
|
-
{% macro addPredefinedNavbar(userDisplayText, chsMonitorGuiUrl, lang, displayAuthorisedAgent, displayYourCompanies) %}
|
|
66
|
+
{% macro addPredefinedNavbar(userDisplayText, chsMonitorGuiUrl, lang, displayAuthorisedAgent, displayYourCompanies, displayUserManagementAdmin) %}
|
|
66
67
|
{% set menuItems = [
|
|
68
|
+
{ id: "user-management-admin", href: "/identity-verification", displayText: lang.userManagementAdmin or "User management admin" } if displayUserManagementAdmin === "yes",
|
|
67
69
|
{ id: "authorised-agent", href: "/authorised-agent", displayText: lang.authorisedAgent or "Authorised agent" } if displayAuthorisedAgent === "yes",
|
|
68
70
|
{ id: "your-companies", href: "/your-companies", displayText: lang.yourCompanies or "Your companies" } if displayYourCompanies === "yes",
|
|
69
71
|
{ id: "your-filings", href: "/user/transactions", displayText: lang.yourFilings or "Your filings" },
|