feat(api): expose demand pipeline explainability
This commit is contained in:
@@ -276,6 +276,17 @@ export async function getDashboardDetail(ctx: DashboardProcedureContext, input:
|
||||
allocatedResources: row.resourceCount,
|
||||
allocatedHours: row.allocatedHours,
|
||||
calendarLocations: row.derivation?.calendarLocations ?? [],
|
||||
explainability: row.derivation
|
||||
? {
|
||||
periodStart: row.derivation.periodStart,
|
||||
periodEnd: row.derivation.periodEnd,
|
||||
periodWorkingHoursBase: row.derivation.periodWorkingHoursBase,
|
||||
requiredHours: row.derivation.requiredHours,
|
||||
fillPct: row.derivation.fillPct,
|
||||
demandSource: row.derivation.demandSource,
|
||||
calendarContextCount: row.derivation.calendarLocations.length,
|
||||
}
|
||||
: null,
|
||||
}))
|
||||
.filter((row) => row.needed > 0)
|
||||
.sort((left, right) => right.needed - left.needed)
|
||||
|
||||
Reference in New Issue
Block a user