diff --git a/src/app/member/[id]/_components/member-role-card.tsx b/src/app/member/[id]/_components/member-role-card.tsx
deleted file mode 100644
index 88188f2..0000000
--- a/src/app/member/[id]/_components/member-role-card.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-"use client";
-
-import { Gauge, TrendingUp, User } from "lucide-react";
-
-import { ReadOnlyMetricCard } from "@/app/dashboard/[teamId]/_components/dashboard-metric-card";
-import { stripHtml } from "@/lib/html-utils";
-import { type RouterOutputs } from "@/trpc/react";
-
-type Role = RouterOutputs["role"]["getByUser"][number];
-type DashboardMetrics = RouterOutputs["dashboard"]["getDashboardCharts"];
-
-interface MemberRoleCardProps {
- role: Role;
- dashboardChart?: DashboardMetrics[number];
-}
-
-export function MemberRoleCard({ role, dashboardChart }: MemberRoleCardProps) {
- const purpose = stripHtml(role.purpose ?? "");
- const truncatedPurpose =
- purpose.length > 100 ? purpose.substring(0, 100) + "..." : purpose;
-
- return (
-
- {/* Header */}
-
-
-
{role.title}
-
-
- {/* Body */}
-
- {/* Purpose */}
- {truncatedPurpose && (
-
- {truncatedPurpose}
-
- )}
-
- {/* Metric info when no chart */}
- {!dashboardChart && role.metric && (
-
-
-
- {role.metric.name}
-
- {role.metric.description && (
-
- {role.metric.description}
-
- )}
-
- )}
-
-
- {/* Footer - Effort Points */}
- {role.effortPoints && (
-
-
-
-
- {role.effortPoints} {role.effortPoints === 1 ? "point" : "points"}
-
-
-
- )}
-
- {/* Metric Chart Section */}
- {dashboardChart ? (
-
-
-
- ) : !role.metric ? (
-
- No KPI assigned
-
- ) : null}
-
- );
-}
diff --git a/src/app/member/[id]/_components/role-kpi-pair.tsx b/src/app/member/[id]/_components/role-kpi-pair.tsx
new file mode 100644
index 0000000..4d54772
--- /dev/null
+++ b/src/app/member/[id]/_components/role-kpi-pair.tsx
@@ -0,0 +1,68 @@
+"use client";
+
+import { KpiCard } from "@/components/metric/kpi-card";
+import { RoleCard, type RoleCardData } from "@/components/role/role-card";
+import { cn } from "@/lib/utils";
+import { type RouterOutputs } from "@/trpc/react";
+
+type Role = RouterOutputs["role"]["getByUser"][number];
+type DashboardChart = RouterOutputs["dashboard"]["getDashboardCharts"][number];
+
+interface RoleKpiPairProps {
+ role: Role;
+ dashboardChart?: DashboardChart;
+ teamId: string;
+}
+
+export function RoleKpiPair({
+ role,
+ dashboardChart,
+ teamId,
+}: RoleKpiPairProps) {
+ const roleCardData: RoleCardData = {
+ id: role.id,
+ title: role.title,
+ purpose: role.purpose,
+ color: role.color ?? "#3b82f6",
+ effortPoints: role.effortPoints,
+ assignedUserId: role.assignedUserId,
+ assignedUserName: role.assignedUserName,
+ metric: role.metric
+ ? {
+ name: role.metric.name,
+ dashboardCharts: role.metric.dashboardCharts,
+ }
+ : null,
+ };
+
+ const hasKpi = !!dashboardChart;
+ const hasMetricButNoChart = !!role.metricId && !dashboardChart;
+
+ return (
+
+
+
+ {hasKpi && (
+
+ )}
+
+ {hasMetricButNoChart && (
+
+ KPI data loading...
+
+ )}
+
+ );
+}
diff --git a/src/app/member/[id]/_components/team-section.tsx b/src/app/member/[id]/_components/team-section.tsx
index 61e9ba8..3d761f9 100644
--- a/src/app/member/[id]/_components/team-section.tsx
+++ b/src/app/member/[id]/_components/team-section.tsx
@@ -13,7 +13,7 @@ import {
} from "@/components/ui/collapsible";
import { type RouterOutputs } from "@/trpc/react";
-import { MemberRoleCard } from "./member-role-card";
+import { RoleKpiPair } from "./role-kpi-pair";
type Role = RouterOutputs["role"]["getByUser"][number];
type DashboardMetrics = RouterOutputs["dashboard"]["getDashboardCharts"];
@@ -74,20 +74,19 @@ export function TeamSection({
-
-
- {roles.map((role) => (
-
- ))}
-
+
+ {roles.map((role) => (
+
+ ))}