feat(api): expose peak times explainability
This commit is contained in:
@@ -757,6 +757,33 @@ describe("dashboard router", () => {
|
||||
totalHours: 320.4,
|
||||
capacityHours: 400.2,
|
||||
utilizationPct: 80,
|
||||
derivation: {
|
||||
periodStart: "2026-03-01",
|
||||
periodEnd: "2026-03-31",
|
||||
calendarContextCount: 1,
|
||||
resourceCount: 4,
|
||||
groupCount: 1,
|
||||
baseAvailableHours: 416.2,
|
||||
effectiveAvailableHours: 400.2,
|
||||
publicHolidayHoursDeduction: 16,
|
||||
absenceDayEquivalent: 1.5,
|
||||
absenceHoursDeduction: 12.5,
|
||||
calendarLocations: [
|
||||
{
|
||||
countryCode: "DE",
|
||||
countryName: "Germany",
|
||||
federalState: "BY",
|
||||
metroCityName: "Augsburg",
|
||||
resourceCount: 4,
|
||||
effectiveAvailableHours: 400.2,
|
||||
},
|
||||
],
|
||||
bookedHours: 320.4,
|
||||
capacityHours: 400.2,
|
||||
remainingCapacityHours: 79.8,
|
||||
overbookedHours: 0,
|
||||
utilizationPct: 80,
|
||||
},
|
||||
},
|
||||
]);
|
||||
vi.mocked(getDashboardTopValueResources).mockResolvedValue([
|
||||
@@ -823,8 +850,30 @@ describe("dashboard router", () => {
|
||||
totalHoursPerDay: 320.4,
|
||||
capacityHours: 400.2,
|
||||
utilizationPct: 80,
|
||||
calendarContextCount: 0,
|
||||
calendarLocations: [],
|
||||
calendarContextCount: 1,
|
||||
calendarLocations: [
|
||||
{
|
||||
countryCode: "DE",
|
||||
countryName: "Germany",
|
||||
federalState: "BY",
|
||||
metroCityName: "Augsburg",
|
||||
resourceCount: 4,
|
||||
effectiveAvailableHours: 400.2,
|
||||
},
|
||||
],
|
||||
explainability: {
|
||||
periodStart: "2026-03-01",
|
||||
periodEnd: "2026-03-31",
|
||||
resourceCount: 4,
|
||||
groupCount: 1,
|
||||
baseAvailableHours: 416.2,
|
||||
effectiveAvailableHours: 400.2,
|
||||
publicHolidayHoursDeduction: 16,
|
||||
absenceDayEquivalent: 1.5,
|
||||
absenceHoursDeduction: 12.5,
|
||||
remainingCapacityHours: 79.8,
|
||||
overbookedHours: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
topResources: [
|
||||
|
||||
Reference in New Issue
Block a user