diff --git a/apps/web/src/components/timeline/TimelineResourcePanel.tsx b/apps/web/src/components/timeline/TimelineResourcePanel.tsx index c54b2db..4e3a175 100644 --- a/apps/web/src/components/timeline/TimelineResourcePanel.tsx +++ b/apps/web/src/components/timeline/TimelineResourcePanel.tsx @@ -141,6 +141,10 @@ function TimelineResourcePanelInner({ orderType: string; hoursPerDay: number; responsiblePerson?: string | null; + role?: string | null; + status?: string; + startDate?: string; + endDate?: string; }[]; } | null>(null); @@ -295,6 +299,10 @@ function TimelineResourcePanelInner({ orderType: string; hours: number; responsiblePerson?: string | null; + role?: string | null; + status?: string; + startDate?: string; + endDate?: string; } >(); for (const alloc of a) { @@ -314,6 +322,10 @@ function TimelineResourcePanelInner({ hours: alloc.hoursPerDay, responsiblePerson: (alloc.project as { responsiblePerson?: string | null }).responsiblePerson ?? null, + role: alloc.role ?? alloc.roleEntity?.name ?? null, + status: alloc.status, + startDate: new Date(alloc.startDate).toISOString().slice(0, 10), + endDate: new Date(alloc.endDate).toISOString().slice(0, 10), }); } } diff --git a/apps/web/src/components/timeline/TimelineTooltip.tsx b/apps/web/src/components/timeline/TimelineTooltip.tsx index 0b9a0f0..3281755 100644 --- a/apps/web/src/components/timeline/TimelineTooltip.tsx +++ b/apps/web/src/components/timeline/TimelineTooltip.tsx @@ -13,6 +13,10 @@ export type HeatmapHoverData = { orderType: string; hoursPerDay: number; responsiblePerson?: string | null; + role?: string | null; + status?: string; + startDate?: string; + endDate?: string; }[]; }; @@ -81,10 +85,20 @@ export function TimelineTooltip({ {entry.projectName}
- {entry.responsiblePerson - ? `Lead: ${entry.responsiblePerson}` - : entry.orderType} + {[ + entry.role, + entry.responsiblePerson ? `Lead: ${entry.responsiblePerson}` : null, + entry.orderType, + ].filter(Boolean).join(" · ")}
+ {entry.startDate && entry.endDate && ( +
+ {entry.startDate} → {entry.endDate} + {entry.status && entry.status !== "CONFIRMED" && ( + {entry.status} + )} +
+ )} {entry.hoursPerDay}h @@ -146,10 +160,20 @@ export function TimelineTooltip({ {entry.projectName}
- {entry.responsiblePerson - ? `Lead: ${entry.responsiblePerson}` - : entry.orderType} + {[ + entry.role, + entry.responsiblePerson ? `Lead: ${entry.responsiblePerson}` : null, + entry.orderType, + ].filter(Boolean).join(" · ")}
+ {entry.startDate && entry.endDate && ( +
+ {entry.startDate} → {entry.endDate} + {entry.status && entry.status !== "CONFIRMED" && ( + {entry.status} + )} +
+ )} {entry.hoursPerDay}h