feat(api): include skill gaps in dashboard detail
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user