From 85b0cb0a6b700938bde1ac3a3b5de9d3a68e995b Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Wed, 27 Aug 2025 14:50:27 +0200 Subject: [PATCH] feat: review UI of skill matrix in myteam page --- components/team-review/skill-matrix.tsx | 175 ++++++++++++++++++++++-- 1 file changed, 164 insertions(+), 11 deletions(-) diff --git a/components/team-review/skill-matrix.tsx b/components/team-review/skill-matrix.tsx index d9e2ee4..c67bc9e 100644 --- a/components/team-review/skill-matrix.tsx +++ b/components/team-review/skill-matrix.tsx @@ -14,10 +14,8 @@ import { TeamMemberProfile, SkillGap } from "@/lib/team-review-types"; import { UserCheck, GraduationCap } from "lucide-react"; import { TechIcon } from "@/components/icons/tech-icon"; import { getImportanceColors } from "@/lib/tech-colors"; -import { - isCoverageBelowObjective, - SKILL_LEVEL_VALUES, -} from "@/lib/evaluation-utils"; +import { isCoverageBelowObjective } from "@/lib/evaluation-utils"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; interface SkillMatrixProps { members: TeamMemberProfile[]; @@ -104,12 +102,167 @@ export function SkillMatrix({ members, skillGaps }: SkillMatrixProps) { -
- {Object.entries(skillsByCategory).map(([category, skills]) => ( -
-

+ + + + Toutes + + {Object.keys(skillsByCategory).map((category) => ( + {category} -

+ + ))} + + + +
+ + + + + Compétence + + + Catégorie + + {members.map((member) => ( + + {member.member.firstName} {member.member.lastName} + + ))} + + Couverture + + + + + {validSkillGaps.sort(sortByImportance).map((skill) => { + const colors = getImportanceColors(skill.importance); + return ( + + +
+
+ +
+
+ + {skill.skillName} + + {skill.risk === "high" && ( + + Risque + + )} +
+
+
+ + + {skill.category} + + + {members.map((member) => { + const memberSkill = member.skills.find( + (s) => s.skillId === skill.skillId + ); + return ( + +
+ {getLevelBadge(memberSkill?.level || null)} + {memberSkill?.canMentor && ( + + + Mentor + + )} + {memberSkill?.wantsToLearn && ( + + + Apprenant + + )} +
+
+ ); + })} + +
+
+
+
+ + {Math.round(skill.coverage || 0)}% + +
+ + + ); + })} + +
+
+
+ + {Object.entries(skillsByCategory).map(([category, skills]) => ( +
@@ -236,9 +389,9 @@ export function SkillMatrix({ members, skillGaps }: SkillMatrixProps) {
-
+ ))} -
+
);