feat(planning): ship holiday-aware planning and assistant upgrades

This commit is contained in:
2026-03-28 22:49:28 +01:00
parent 2a005794e7
commit 4f48afe7b4
151 changed files with 17738 additions and 1940 deletions
+15 -11
View File
@@ -36,40 +36,44 @@ function clamp(value: number, min: number, max: number): number {
const dashboardWidgetTypeSchema = z.enum(DASHBOARD_WIDGET_TYPES);
const resourceTableWidgetConfigSchema = z.object({
const widgetChromeConfigSchema = z.object({
showDetails: z.boolean().optional(),
});
const resourceTableWidgetConfigSchema = widgetChromeConfigSchema.extend({
chapter: z.preprocess(toNonEmptyString, z.string().optional()),
});
const projectTableWidgetConfigSchema = z.object({
const projectTableWidgetConfigSchema = widgetChromeConfigSchema.extend({
search: z.preprocess(toNonEmptyString, z.string().optional()),
status: z.nativeEnum(ProjectStatus).optional(),
});
const peakTimesWidgetConfigSchema = z.object({
const peakTimesWidgetConfigSchema = widgetChromeConfigSchema.extend({
granularity: z.enum(["week", "month"]).optional(),
groupBy: z.enum(["project", "chapter", "resource"]).optional(),
});
const demandWidgetConfigSchema = z.object({
const demandWidgetConfigSchema = widgetChromeConfigSchema.extend({
groupBy: z.enum(["project", "person", "chapter"]).optional(),
});
const topValueWidgetConfigSchema = z.object({
const topValueWidgetConfigSchema = widgetChromeConfigSchema.extend({
limit: z.number().int().min(1).max(100).optional(),
});
const chargeabilityWidgetConfigSchema = z.object({
const chargeabilityWidgetConfigSchema = widgetChromeConfigSchema.extend({
topN: z.number().int().min(1).max(100).optional(),
watchlistThreshold: z.number().int().min(0).max(100).optional(),
});
const myProjectsWidgetConfigSchema = z.object({
const myProjectsWidgetConfigSchema = widgetChromeConfigSchema.extend({
showFavorites: z.boolean().optional(),
showResponsible: z.boolean().optional(),
});
export const dashboardWidgetConfigSchemas = {
"stat-cards": z.object({}),
"stat-cards": widgetChromeConfigSchema,
"resource-table": resourceTableWidgetConfigSchema,
"project-table": projectTableWidgetConfigSchema,
"peak-times-chart": peakTimesWidgetConfigSchema,
@@ -77,9 +81,9 @@ export const dashboardWidgetConfigSchemas = {
"top-value-resources": topValueWidgetConfigSchema,
"chargeability-overview": chargeabilityWidgetConfigSchema,
"my-projects": myProjectsWidgetConfigSchema,
"budget-forecast": z.object({}),
"skill-gap": z.object({}),
"project-health": z.object({}),
"budget-forecast": widgetChromeConfigSchema,
"skill-gap": widgetChromeConfigSchema,
"project-health": widgetChromeConfigSchema,
} as const;
type DashboardWidgetConfigSchemaMap = typeof dashboardWidgetConfigSchemas;