- );
-};
-
-const NavigationMenu = () => {
- const intl = useIntl();
- const paths = useRoutes();
- const { userAuthInfo } = useAuthorization();
- const { loggedIn } = useAuthentication();
-
- let menuItems = [
-
- {intl.formatMessage(navigationMessages.home)}
- ,
-
- {intl.formatMessage(navigationMessages.findTalent)}
- ,
-
- {intl.formatMessage(navigationMessages.browseJobs)}
- ,
- ];
- let authLinks = [
-
- {intl.formatMessage(authMessages.signIn)}
- ,
-
- {intl.formatMessage(authMessages.signUp)}
- ,
- ];
- if (loggedIn && userAuthInfo) {
- const roleAssignments = unpackMaybes(userAuthInfo?.roleAssignments);
- const userRoleNames = roleAssignments.map((a) => a.role?.name);
- if (
- [
- ROLE_NAME.PoolOperator,
- ROLE_NAME.RequestResponder,
- ROLE_NAME.CommunityManager,
- ROLE_NAME.PlatformAdmin,
- ROLE_NAME.CommunityRecruiter,
- ROLE_NAME.CommunityAdmin,
- ROLE_NAME.ProcessOperator,
- ].some((authorizedRoleName) =>
- userRoleNames?.includes(authorizedRoleName),
- )
- ) {
- menuItems = [
- ...menuItems,
-
- {intl.formatMessage({
- defaultMessage: "Admin",
- id: "wHX/8C",
- description: "Title tag for Admin site",
- })}
- ,
- ];
- }
- authLinks = [
-
- {intl.formatMessage(authMessages.signOut)}
- ,
- ];
- if (hasRole(ROLE_NAME.Applicant, userAuthInfo.roleAssignments)) {
- authLinks = [
-
- {intl.formatMessage(navigationMessages.profileAndApplications)}
- ,
- ...authLinks,
- ];
- }
- }
-
- return (
-
- );
-};
-
-export default NavigationMenu;
diff --git a/packages/ui/src/components/Card/CardSectioned/CardSectioned.tsx b/packages/ui/src/components/Card/CardSectioned/CardSectioned.tsx
index fbc8bc5f9ad..0fdb4ad751b 100644
--- a/packages/ui/src/components/Card/CardSectioned/CardSectioned.tsx
+++ b/packages/ui/src/components/Card/CardSectioned/CardSectioned.tsx
@@ -19,7 +19,7 @@ const Item = ({ children, ...rest }: ItemProps) => {
type ItemElement = ReactElement;
-export interface RootProps {
+interface RootProps {
children: ItemElement | ItemElement[];
}
From 26fe7c899c89e317f86900f1cce8efe39a57875f Mon Sep 17 00:00:00 2001
From: Peter Giles <8978655+petertgiles@users.noreply.github.com>
Date: Wed, 30 Oct 2024 13:02:35 -0400
Subject: [PATCH 09/17] translations
---
apps/web/src/lang/fr.json | 60 ++++++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 20 deletions(-)
diff --git a/apps/web/src/lang/fr.json b/apps/web/src/lang/fr.json
index adb9d478ae5..9e913c0147e 100644
--- a/apps/web/src/lang/fr.json
+++ b/apps/web/src/lang/fr.json
@@ -363,6 +363,10 @@
"defaultMessage": "Expérience supprimée",
"description": "Message displayed to user after experience deleted."
},
+ "/qXiOK": {
+ "defaultMessage": "Informations sur la compétence",
+ "description": "Nav tab label for skill information"
+ },
"/rmunL": {
"defaultMessage": "En fonction des besoins",
"description": "As and when needed personnel other requirement"
@@ -403,6 +407,10 @@
"defaultMessage": "Fonds de formation et de perfectionnement de la collectivité de la TI",
"description": "Title for the it training fund page"
},
+ "04iYYO": {
+ "defaultMessage": "Créer une compétence",
+ "description": "Title for Create skill"
+ },
"04smVa": {
"defaultMessage": "Recrutement ciblé",
"description": "Label for an targeting (active) qualified recruitment"
@@ -419,6 +427,10 @@
"defaultMessage": "Utilisez le bouton \"Créer un processus\" pour commencer.",
"description": "Instructions for adding a process item."
},
+ "08IbRz": {
+ "defaultMessage": "Informations sur la compétence",
+ "description": "Heading for the 'view a skill' form"
+ },
"08rkLr": {
"defaultMessage": "Durée de la possibilité",
"description": "Label for a process' opportunity employment duration"
@@ -511,10 +523,6 @@
"defaultMessage": "Candidats du bassin",
"description": "Title for pool candidates"
},
- "0VlOQq": {
- "defaultMessage": "Modifier - compétence",
- "description": "Page title for the edit skill page."
- },
"0YZeO0": {
"defaultMessage": "Embauché (Temporaire)",
"description": "Status for an application that has been hired with a casual contract"
@@ -1759,10 +1767,6 @@
"defaultMessage": "Un groupe d’Autochtones qui se tiennent debout avec un tambour à main peint.",
"description": "Indigenous Apprenticeship hero image text alternative"
},
- "71mPNh": {
- "defaultMessage": "Créer une compétence",
- "description": "Title for Create skill"
- },
"72pd2Z": {
"defaultMessage": "gestion de l’information, ou",
"description": "List item of experiences required in application education page."
@@ -4171,10 +4175,6 @@
"defaultMessage": "Révisez votre candidature",
"description": "Page title for the application review page."
},
- "JxVREd": {
- "defaultMessage": "Familles",
- "description": "Label displayed on the skill form families field."
- },
"Jz0oC2": {
"defaultMessage": "À propos de nous (anglais)",
"description": "Label for a process' English about us"
@@ -5171,6 +5171,10 @@
"defaultMessage": "Oiseau-mouche en plein vol, qui représente le messager de la joie au sein de plusieurs communautés autochtones",
"description": "Description of a decorative image of a hummingbird"
},
+ "P478xU": {
+ "defaultMessage": "Créez la compétence",
+ "description": "Button label to create a new skill"
+ },
"P6jGb4": {
"defaultMessage": "Veuillez préciser les exigences linguistiques",
"description": "Label for _other official language requirement_ fieldset in the _digital services contracting questionnaire_"
@@ -7282,6 +7286,10 @@
"defaultMessage": "Renseignements sur les employés du gouvernement",
"description": "Title of the Government Information link section"
},
+ "ZspYm7": {
+ "defaultMessage": "Annulez et revenez à l'éditeur de compétence",
+ "description": "Button label to return to the skills table"
+ },
"ZuFBx5": {
"defaultMessage": "Débutant - Je possède des compétences de base en lecture, écriture et communication verbale.",
"description": "Message for the beginner language ability option"
@@ -7358,6 +7366,10 @@
"defaultMessage": "Un plan en lien avec talents pour l’initiative numérique a-t-il été soumis précédemment pour cette initiative?",
"description": "Label for _digital initiative plan submitted_ fieldset in the _digital services contracting questionnaire_"
},
+ "aIEKtJ": {
+ "defaultMessage": "Informations sur la compétence",
+ "description": "Heading for the 'edit a skill' form"
+ },
"aIMh6f": {
"defaultMessage": "Cinq compétences techniques que vous aimeriez perfectionner",
"description": "Page title for the improve technical skills page"
@@ -7774,10 +7786,6 @@
"defaultMessage": "Téléchargez le questionnaire : {formName}",
"description": "Link text for form download"
},
- "cWqtEU": {
- "defaultMessage": "Chercher les compétences",
- "description": "Label for the skills table search input"
- },
"cXszfI": {
"defaultMessage": "Sélectionnez l’option qui représente le mieux votre raison pour soumettre la présente demande de talent",
"description": "Legend for the options related to the reason for submitting a request."
@@ -8162,6 +8170,10 @@
"defaultMessage": "IT-04 : Conseiller principal ou Gestionnaire",
"description": "IT-04 classification label including titles"
},
+ "eJPU4G": {
+ "defaultMessage": "Modifiez les informations sur la compétence",
+ "description": "Link to edit the currently viewed skill"
+ },
"eKPE3F": {
"defaultMessage": "Vous ne recevez pas de possibilités découlant de ce recrutement.",
"description": "Message displayed when a user has suspended an application to a recruitment"
@@ -10194,6 +10206,10 @@
"defaultMessage": "Vous n'avez aucune expérience liée à cette compétence",
"description": "The skill is not attached to any experience"
},
+ "oCFoWU": {
+ "defaultMessage": "Informations sur la compétence",
+ "description": "Heading for the 'create a skill' form"
+ },
"oES0/4": {
"defaultMessage": "Les apprenti·es autochtones sont embauché·es par une organisation d’accueil au niveau d’entrée du groupe des TI (IT-01 ou équivalent) pour une période de 24 mois.",
"description": "Paragraph 1 of the 'Hired as a term employee' subsection"
@@ -10554,6 +10570,10 @@
"defaultMessage": "Réduire tous les filtres avancés",
"description": "Button text to hide all advanced filters"
},
+ "q5j7GV": {
+ "defaultMessage": "Créer une nouvelle compétence",
+ "description": "Title for Create skill"
+ },
"q5rd9x": {
"defaultMessage": " Description de l’expérience",
"description": "Label displayed on Personal Experience form for experience description input"
@@ -10990,6 +11010,10 @@
"defaultMessage": "Informations sur le ministère",
"description": "Nav tab label for department information"
},
+ "spzerx": {
+ "defaultMessage": "Modifier une compétence",
+ "description": "Page title for the edit skill page."
+ },
"sr20Tb": {
"defaultMessage": "Citoyenneté",
"description": "Citizenship label"
@@ -11838,10 +11862,6 @@
"defaultMessage": "{candidateCount, plural, =0 {Il y a actuellement environ {candidateCount} candidats qui répondent à vos critères.} =1 {Il y a actuellement environ {candidateCount} candidat qui répond à vos critères.} other {Il y a actuellement environ {candidateCount} candidats qui répondent à vos critères.} }",
"description": "Message for total estimated candidates box next to search form."
},
- "xx8yaE": {
- "defaultMessage": "Familles",
- "description": "Label displayed on the skill form skill families field."
- },
"xzSXz9": {
"defaultMessage": "Type d’emploi",
"description": "Employment type label"
From 1a72cccb0c500619e7d52100c6feed4184e8cfa7 Mon Sep 17 00:00:00 2001
From: Peter Giles <8978655+petertgiles@users.noreply.github.com>
Date: Wed, 30 Oct 2024 13:06:24 -0400
Subject: [PATCH 10/17] English tweaks
---
apps/web/src/lang/fr.json | 4 ++--
apps/web/src/pages/Skills/CreateSkillPage.tsx | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/apps/web/src/lang/fr.json b/apps/web/src/lang/fr.json
index 9e913c0147e..de842a2e799 100644
--- a/apps/web/src/lang/fr.json
+++ b/apps/web/src/lang/fr.json
@@ -5171,7 +5171,7 @@
"defaultMessage": "Oiseau-mouche en plein vol, qui représente le messager de la joie au sein de plusieurs communautés autochtones",
"description": "Description of a decorative image of a hummingbird"
},
- "P478xU": {
+ "fcH4nb": {
"defaultMessage": "Créez la compétence",
"description": "Button label to create a new skill"
},
@@ -7286,7 +7286,7 @@
"defaultMessage": "Renseignements sur les employés du gouvernement",
"description": "Title of the Government Information link section"
},
- "ZspYm7": {
+ "oCL/sl": {
"defaultMessage": "Annulez et revenez à l'éditeur de compétence",
"description": "Button label to return to the skills table"
},
diff --git a/apps/web/src/pages/Skills/CreateSkillPage.tsx b/apps/web/src/pages/Skills/CreateSkillPage.tsx
index 746c26a9273..6d0887f5933 100644
--- a/apps/web/src/pages/Skills/CreateSkillPage.tsx
+++ b/apps/web/src/pages/Skills/CreateSkillPage.tsx
@@ -306,15 +306,15 @@ export const CreateSkillForm = ({
>
{intl.formatMessage({
- defaultMessage: "Cancel and go back to skill editor",
- id: "ZspYm7",
+ defaultMessage: "Cancel and go back to the skill editor",
+ id: "oCL/sl",
description: "Button label to return to the skills table",
})}
From c7cba56ae945d002f4d85606b2f50b89f00c16bb Mon Sep 17 00:00:00 2001
From: Peter Giles <8978655+petertgiles@users.noreply.github.com>
Date: Wed, 30 Oct 2024 13:12:54 -0400
Subject: [PATCH 11/17] fix link bug
---
apps/web/src/pages/Skills/CreateSkillPage.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/web/src/pages/Skills/CreateSkillPage.tsx b/apps/web/src/pages/Skills/CreateSkillPage.tsx
index 6d0887f5933..594abcfe270 100644
--- a/apps/web/src/pages/Skills/CreateSkillPage.tsx
+++ b/apps/web/src/pages/Skills/CreateSkillPage.tsx
@@ -311,7 +311,7 @@ export const CreateSkillForm = ({
description: "Button label to create a new skill",
})}
/>
-
+
{intl.formatMessage({
defaultMessage: "Cancel and go back to the skill editor",
id: "oCL/sl",
From de89808b03c608a2d56182310b31563edf18725b Mon Sep 17 00:00:00 2001
From: Peter Giles <8978655+petertgiles@users.noreply.github.com>
Date: Wed, 30 Oct 2024 13:23:20 -0400
Subject: [PATCH 12/17] clean fr file
---
apps/web/src/lang/fr.json | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/apps/web/src/lang/fr.json b/apps/web/src/lang/fr.json
index de842a2e799..b2848719ce9 100644
--- a/apps/web/src/lang/fr.json
+++ b/apps/web/src/lang/fr.json
@@ -5171,10 +5171,6 @@
"defaultMessage": "Oiseau-mouche en plein vol, qui représente le messager de la joie au sein de plusieurs communautés autochtones",
"description": "Description of a decorative image of a hummingbird"
},
- "fcH4nb": {
- "defaultMessage": "Créez la compétence",
- "description": "Button label to create a new skill"
- },
"P6jGb4": {
"defaultMessage": "Veuillez préciser les exigences linguistiques",
"description": "Label for _other official language requirement_ fieldset in the _digital services contracting questionnaire_"
@@ -7286,10 +7282,6 @@
"defaultMessage": "Renseignements sur les employés du gouvernement",
"description": "Title of the Government Information link section"
},
- "oCL/sl": {
- "defaultMessage": "Annulez et revenez à l'éditeur de compétence",
- "description": "Button label to return to the skills table"
- },
"ZuFBx5": {
"defaultMessage": "Débutant - Je possède des compétences de base en lecture, écriture et communication verbale.",
"description": "Message for the beginner language ability option"
@@ -8450,6 +8442,10 @@
"defaultMessage": "Créer une classification",
"description": "Page title for the classification creation page"
},
+ "fcH4nb": {
+ "defaultMessage": "Créez la compétence",
+ "description": "Button label to create a new skill"
+ },
"fdKtYm": {
"defaultMessage": "Description (anglais)",
"description": "Label displayed on the update a skill form description (English) field."
@@ -10210,6 +10206,10 @@
"defaultMessage": "Informations sur la compétence",
"description": "Heading for the 'create a skill' form"
},
+ "oCL/sl": {
+ "defaultMessage": "Annulez et revenez à l'éditeur de compétence",
+ "description": "Button label to return to the skills table"
+ },
"oES0/4": {
"defaultMessage": "Les apprenti·es autochtones sont embauché·es par une organisation d’accueil au niveau d’entrée du groupe des TI (IT-01 ou équivalent) pour une période de 24 mois.",
"description": "Paragraph 1 of the 'Hired as a term employee' subsection"
From 846a2224a15e41d3a58c619cc798b483a94a98b6 Mon Sep 17 00:00:00 2001
From: Peter Giles <8978655+petertgiles@users.noreply.github.com>
Date: Wed, 30 Oct 2024 15:16:39 -0400
Subject: [PATCH 13/17] fix read more in table
---
.../pages/Skills/components/SkillTable.tsx | 16 +++++-----
.../pages/Skills/components/tableHelpers.tsx | 29 ++++++++++---------
2 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/apps/web/src/pages/Skills/components/SkillTable.tsx b/apps/web/src/pages/Skills/components/SkillTable.tsx
index 0a7d81df994..b8ed2da1c6a 100644
--- a/apps/web/src/pages/Skills/components/SkillTable.tsx
+++ b/apps/web/src/pages/Skills/components/SkillTable.tsx
@@ -30,6 +30,7 @@ import messages from "~/lang/frCompiled.json";
import {
categoryAccessor,
+ descriptionCell,
familiesAccessor,
skillFamiliesCell,
} from "./tableHelpers";
@@ -209,15 +210,12 @@ const SkillTable = ({
{
id: "description",
sortingFn: normalizedText,
- cell: ({ row: { original: skill } }) => {
- const maxCharacterCount = 32;
- const description = getLocalizedName(skill.description, intl);
- return description.length < maxCharacterCount ? (
- description
- ) : (
- <>{description.slice(0, maxCharacterCount)}…>
- );
- },
+ cell: ({ row: { original: skill } }) =>
+ descriptionCell(
+ intl,
+ getLocalizedName(skill.name, intl),
+ getLocalizedName(skill.description, intl),
+ ),
header: intl.formatMessage({
defaultMessage: "Description",
id: "9yGJ6k",
diff --git a/apps/web/src/pages/Skills/components/tableHelpers.tsx b/apps/web/src/pages/Skills/components/tableHelpers.tsx
index 224efbbb84a..458fdbfe3d2 100644
--- a/apps/web/src/pages/Skills/components/tableHelpers.tsx
+++ b/apps/web/src/pages/Skills/components/tableHelpers.tsx
@@ -22,23 +22,24 @@ export function skillFamiliesCell(
intl: IntlShape,
) {
const maxCharacterCount = 50;
- const families = skillFamilies
+ const familyNames = skillFamilies
?.filter(notEmpty)
.sort()
- .map((family) => {
- const name = getLocalizedName(family.name, intl);
- return (
-