feat(api): expose peak times explainability
This commit is contained in:
@@ -64,6 +64,7 @@ describe("assistant dashboard tools detail aggregation", () => {
|
||||
calendarContextCount: 1,
|
||||
resourceCount: 4,
|
||||
groupCount: 1,
|
||||
baseAvailableHours: 416.2,
|
||||
calendarLocations: [
|
||||
{
|
||||
countryCode: "DE",
|
||||
@@ -79,6 +80,10 @@ describe("assistant dashboard tools detail aggregation", () => {
|
||||
remainingCapacityHours: 79.8,
|
||||
overbookedHours: 0,
|
||||
utilizationPct: 80,
|
||||
effectiveAvailableHours: 400.2,
|
||||
publicHolidayHoursDeduction: 16,
|
||||
absenceDayEquivalent: 1.5,
|
||||
absenceHoursDeduction: 12.5,
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -190,6 +195,19 @@ describe("assistant dashboard tools detail aggregation", () => {
|
||||
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: [
|
||||
|
||||
@@ -167,8 +167,19 @@ describe("dashboard procedure support", () => {
|
||||
capacityHours: 200.12,
|
||||
utilizationPct: 80,
|
||||
derivation: {
|
||||
periodStart: "2026-03-01",
|
||||
periodEnd: "2026-03-31",
|
||||
calendarContextCount: 1,
|
||||
resourceCount: 5,
|
||||
groupCount: 2,
|
||||
baseAvailableHours: 216,
|
||||
effectiveAvailableHours: 200.12,
|
||||
publicHolidayHoursDeduction: 8,
|
||||
absenceDayEquivalent: 1,
|
||||
absenceHoursDeduction: 7.88,
|
||||
calendarLocations: [{ countryCode: "DE", federalState: "BY", metroCityName: "Munich" }],
|
||||
remainingCapacityHours: 39.78,
|
||||
overbookedHours: 0,
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -228,6 +239,19 @@ describe("dashboard procedure support", () => {
|
||||
utilizationPct: 80,
|
||||
calendarContextCount: 1,
|
||||
calendarLocations: [{ countryCode: "DE", federalState: "BY", metroCityName: "Munich" }],
|
||||
explainability: {
|
||||
periodStart: "2026-03-01",
|
||||
periodEnd: "2026-03-31",
|
||||
resourceCount: 5,
|
||||
groupCount: 2,
|
||||
baseAvailableHours: 216,
|
||||
effectiveAvailableHours: 200.12,
|
||||
publicHolidayHoursDeduction: 8,
|
||||
absenceDayEquivalent: 1,
|
||||
absenceHoursDeduction: 7.88,
|
||||
remainingCapacityHours: 39.78,
|
||||
overbookedHours: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
topResources: [
|
||||
|
||||
@@ -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