+ {week.map(({ date, key, items, statusCounts }) => {
+ const countForStatus = (statusCounts || {})[statusKey] || 0
+ const baseDensity = countForStatus
+ const hoverRing =
+ statusKey === 'upcoming' ? 'hover:ring-blue-300/80 hover:shadow-[0_0_0_1px_rgba(147,197,253,0.8)]' :
+ statusKey === 'in_progress' ? 'hover:ring-amber-300/80 hover:shadow-[0_0_0_1px_rgba(252,211,77,0.8)]' :
+ statusKey === 'completed' ? 'hover:ring-green-300/80 hover:shadow-[0_0_0_1px_rgba(74,222,128,0.8)]' :
+ statusKey === 'overdue' ? 'hover:ring-red-400/90 hover:shadow-[0_0_0_1px_rgba(248,113,113,0.9)]' :
+ 'hover:ring-white/60';
+ return (
+
{
+ if (!items || !items.length) return
+ const match = items.find(({ deliverable }) => deliverable.status === statusKey) || items[0]
+ if (match) openFocus(match.project.id, match.deliverable.id)
+ }}
+ onMouseEnter={(e) => {
+ const filtered = (items || []).filter(({ deliverable }) => deliverable.status === statusKey)
+ const showItems = filtered.length ? filtered : items || []
+ setTooltip({
+ x: e.clientX,
+ y: e.clientY,
+ date,
+ statusKey,
+ items: showItems,
+ })
+ }}
+ onMouseLeave={() => setTooltip(null)}
+ />
+ )
+ })}
+
+ ))}
+