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:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user