feat(api): include skill gaps in dashboard detail

This commit is contained in:
2026-03-31 23:46:07 +02:00
parent 2de5a0eede
commit f2d511ebc8
5 changed files with 115 additions and 2 deletions
@@ -477,6 +477,24 @@ export async function getDashboardDetail(ctx: DashboardProcedureContext, input:
}));
}
if (section === "all" || section === "skill_gaps") {
const skillGapSummary = await getDashboardSkillGapSummaryRead(ctx);
result.skillGaps = {
totalOpenPositions: skillGapSummary.totalOpenPositions,
roleGaps: skillGapSummary.roleGaps
.slice(0, 10)
.map((gap) => ({
role: gap.role,
gap: gap.gap,
needed: gap.needed,
filled: gap.filled,
fillRate: gap.fillRate,
})),
topSkillsInSupply: skillGapSummary.skillSupplyTop10.slice(0, 5),
resourcesByRole: skillGapSummary.resourcesByRole.slice(0, 5),
};
}
return result;
}