feat(api): include skill gaps in dashboard detail
This commit is contained in:
@@ -34,6 +34,7 @@ import {
|
||||
getDashboardOverview,
|
||||
getDashboardPeakTimes,
|
||||
getDashboardProjectHealth,
|
||||
getDashboardSkillGapSummary,
|
||||
getDashboardTopValueResources,
|
||||
} from "@capakraken/application";
|
||||
import { cacheGet } from "../lib/cache.js";
|
||||
@@ -293,6 +294,21 @@ describe("dashboard procedure support", () => {
|
||||
},
|
||||
},
|
||||
]);
|
||||
vi.mocked(getDashboardSkillGapSummary).mockResolvedValue({
|
||||
roleGaps: [
|
||||
{ role: "Pipeline TD", needed: 4, filled: 1, gap: 3, fillRate: 25 },
|
||||
{ role: "Lighting TD", needed: 2, filled: 1, gap: 1, fillRate: 50 },
|
||||
],
|
||||
totalOpenPositions: 4,
|
||||
skillSupplyTop10: [
|
||||
{ skill: "houdini", resourceCount: 5 },
|
||||
{ skill: "nuke", resourceCount: 4 },
|
||||
],
|
||||
resourcesByRole: [
|
||||
{ role: "Compositor", count: 6 },
|
||||
{ role: "Pipeline TD", count: 2 },
|
||||
],
|
||||
});
|
||||
|
||||
try {
|
||||
const result = await getDashboardDetail(createContext(), { section: "all" });
|
||||
@@ -417,6 +433,21 @@ describe("dashboard procedure support", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
skillGaps: {
|
||||
totalOpenPositions: 4,
|
||||
roleGaps: [
|
||||
{ role: "Pipeline TD", gap: 3, needed: 4, filled: 1, fillRate: 25 },
|
||||
{ role: "Lighting TD", gap: 1, needed: 2, filled: 1, fillRate: 50 },
|
||||
],
|
||||
topSkillsInSupply: [
|
||||
{ skill: "houdini", resourceCount: 5 },
|
||||
{ skill: "nuke", resourceCount: 4 },
|
||||
],
|
||||
resourcesByRole: [
|
||||
{ role: "Compositor", count: 6 },
|
||||
{ role: "Pipeline TD", count: 2 },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
expect(getDashboardChargeabilityOverview).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user