feat: enhance team overview and skills tabs with improved skill distribution and UI

- Updated team overview tab to calculate and display skill distribution by individual skill levels.
- Refactored skill tab layout for better responsiveness and readability, including adjustments to grid and text sizes.
- Added a new utility function to calculate skill level distribution for cleaner code and reusability.
- Improved visual elements for better user interaction and clarity in skill metrics.
This commit is contained in:
Julien Froidefond
2025-08-22 13:59:51 +02:00
parent 8974a9b579
commit 5c76ec0549
3 changed files with 103 additions and 97 deletions

View File

@@ -49,3 +49,20 @@ export function getSkillLevelLabel(level: string): string {
return "";
}
}
/**
* Calcule la répartition des niveaux par compétence individuelle
*/
export function calculateSkillLevelDistribution(
members: Array<{ skills: Array<{ level: number }> }>
) {
const allSkills = members.flatMap((m) => m.skills);
return {
expert: allSkills.filter((s) => s.level === 3).length,
autonomous: allSkills.filter((s) => s.level === 2).length,
notAutonomous: allSkills.filter((s) => s.level === 1).length,
never: allSkills.filter((s) => s.level === 0).length,
total: allSkills.length,
};
}