agnets done
This commit is contained in:
@@ -140,9 +140,14 @@ export default function AdminTalentPool() {
|
||||
...s,
|
||||
count: s.members.length,
|
||||
available: s.members.filter((p) => (p.availability || []).length > 0).length,
|
||||
avgExperience: s.members.length
|
||||
? Math.round(s.members.reduce((sum, p) => sum + (p.experience_years || 0), 0) / s.members.length)
|
||||
: 0,
|
||||
avgExperience: (() => {
|
||||
/* 0 years is "not stated", not "first year" — the cards that show it
|
||||
gate on experience_years > 0, so the average is over the same set. */
|
||||
const stated = s.members.filter((p) => (p.experience_years || 0) > 0);
|
||||
return stated.length
|
||||
? Math.round(stated.reduce((sum, p) => sum + p.experience_years, 0) / stated.length)
|
||||
: 0;
|
||||
})(),
|
||||
}));
|
||||
}, [profiles]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user