From 0f129dc0de0aca1ea3b7a34eb9ed4994af7df92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Sun, 22 Mar 2026 22:04:30 +0100 Subject: [PATCH] fix: add InfoTooltip column descriptions + dark theme to 3 new widgets Budget Forecast Widget: - Project: "Active projects with a defined budget" - Budget Usage: "Percentage of total budget consumed by current allocations" - Burn/mo: "Monthly burn rate based on currently active allocations" - Exhaustion: "Projected date when budget will be fully consumed" Project Health Widget: - Project: "Active projects scored across three health dimensions" - B / S / T: "Budget health, Staffing health, Timeline health" - Score: "Composite score: average of Budget, Staffing, Timeline (0-100)" - Score badge: dark theme variants for green/amber/red Skill Gap Widget: - Skill: "Skills required by open demand positions" - Demand: "Number of unfilled demand requirements needing this skill" - Supply: "Number of active resources with this skill at proficiency 3+" - Gap: "Supply minus Demand: negative = shortage, positive = surplus" All three: added dark:bg-gray-800/50 thead, dark:divide-gray-800 tbody, dark:hover:bg-gray-800/30 rows, dark:text-gray-100/300/400 text colors. Co-Authored-By: claude-flow --- .../widgets/BudgetForecastWidget.tsx | 33 ++++++++++++------- .../dashboard/widgets/ProjectHealthWidget.tsx | 29 +++++++++------- .../dashboard/widgets/SkillGapWidget.tsx | 29 ++++++++++------ 3 files changed, 57 insertions(+), 34 deletions(-) diff --git a/apps/web/src/components/dashboard/widgets/BudgetForecastWidget.tsx b/apps/web/src/components/dashboard/widgets/BudgetForecastWidget.tsx index d32c49d..dd0367b 100644 --- a/apps/web/src/components/dashboard/widgets/BudgetForecastWidget.tsx +++ b/apps/web/src/components/dashboard/widgets/BudgetForecastWidget.tsx @@ -2,6 +2,7 @@ import { trpc } from "~/lib/trpc/client.js"; import type { WidgetProps } from "~/components/dashboard/widget-registry.js"; +import { InfoTooltip } from "~/components/ui/InfoTooltip.js"; function colorClass(pct: number): string { if (pct > 90) return "bg-red-500"; @@ -48,24 +49,32 @@ export function BudgetForecastWidget(_props: WidgetProps) { return (
- + - - - - + + + + - + {rows.map((row) => ( - - + - - diff --git a/apps/web/src/components/dashboard/widgets/ProjectHealthWidget.tsx b/apps/web/src/components/dashboard/widgets/ProjectHealthWidget.tsx index fc29df1..68ffbe7 100644 --- a/apps/web/src/components/dashboard/widgets/ProjectHealthWidget.tsx +++ b/apps/web/src/components/dashboard/widgets/ProjectHealthWidget.tsx @@ -2,6 +2,7 @@ import { trpc } from "~/lib/trpc/client.js"; import type { WidgetProps } from "~/components/dashboard/widget-registry.js"; +import { InfoTooltip } from "~/components/ui/InfoTooltip.js"; function healthDot(value: number): string { if (value >= 70) return "bg-green-500"; @@ -10,9 +11,9 @@ function healthDot(value: number): string { } function scoreBadge(score: number): string { - if (score >= 70) return "bg-green-100 text-green-700"; - if (score >= 40) return "bg-amber-100 text-amber-700"; - return "bg-red-100 text-red-700"; + if (score >= 70) return "bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300"; + if (score >= 40) return "bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300"; + return "bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"; } export function ProjectHealthWidget(_props: WidgetProps) { @@ -53,20 +54,24 @@ export function ProjectHealthWidget(_props: WidgetProps) { return (
ProjectBudget UsageBurn/moExhaustion + Project + + Budget Usage + + Burn/mo + + Exhaustion +
- {row.shortCode} +
+ {row.shortCode} {row.projectName}
-
+
+ {row.burnRate > 0 ? `${(row.burnRate / 100).toLocaleString("de-DE", { maximumFractionDigits: 0 })} \u20AC` : "\u2014"} + {row.estimatedExhaustionDate ?? "\u2014"}
- + - - + + - - + {rows.map((row) => ( - - +
Project - B / S / T + + Project + + B / S / T + + Score Score
- {row.shortCode} +
+ {row.shortCode} {row.projectName} diff --git a/apps/web/src/components/dashboard/widgets/SkillGapWidget.tsx b/apps/web/src/components/dashboard/widgets/SkillGapWidget.tsx index 035ad05..6af5408 100644 --- a/apps/web/src/components/dashboard/widgets/SkillGapWidget.tsx +++ b/apps/web/src/components/dashboard/widgets/SkillGapWidget.tsx @@ -2,6 +2,7 @@ import { trpc } from "~/lib/trpc/client.js"; import type { WidgetProps } from "~/components/dashboard/widget-registry.js"; +import { InfoTooltip } from "~/components/ui/InfoTooltip.js"; export function SkillGapWidget(_props: WidgetProps) { const { data, isLoading } = trpc.dashboard.getSkillGaps.useQuery( @@ -37,27 +38,35 @@ export function SkillGapWidget(_props: WidgetProps) { return (
- + - - - - + + + + - + {rows.map((row) => { const isShortage = row.gap < 0; const isSurplus = row.gap > 0; return ( - - + - -
SkillDemandSupplyGap + Skill + + Demand + + Supply + + Gap +
+
{row.skill} + {row.demand} + {row.supply}