diff --git a/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/DevelopmentActivityLog.tsx b/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/DevelopmentActivityLog.tsx index dc5cf4c..ef6c5b1 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/DevelopmentActivityLog.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/DevelopmentActivityLog.tsx @@ -35,12 +35,22 @@ export function DevelopmentActivityLog({ history = [] }: DevelopmentActivityLogP const getDotColor = (index: number, desc: string) => { const lower = desc.toLowerCase(); + // Technical status progression colors matching badge variants + if (lower.includes('development') || lower.includes('dev')) return 'bg-rose-400 dark:bg-rose-600'; + if (lower.includes('system integration') || lower.includes('sit')) return 'bg-orange-400 dark:bg-orange-600'; + if (lower.includes('user acceptance') || lower.includes('uat')) return 'bg-yellow-400 dark:bg-yellow-500'; + if (lower.includes('production trial') || lower.includes('ptr')) return 'bg-emerald-400 dark:bg-emerald-600'; + if (lower.includes('go-live') || lower.includes('go live')) return 'bg-cyan-400 dark:bg-cyan-600'; + if (lower.includes('bast') || lower.includes('handover')) return 'bg-violet-400 dark:bg-violet-600'; + if (lower.includes('warranty')) return 'bg-fuchsia-400 dark:bg-fuchsia-600'; + + // Administrative and other events if (lower.includes('create')) return 'bg-emerald-500'; if (lower.includes('assign')) return 'bg-sky-500'; if (lower.includes('status to active') || lower.includes('status to completed')) return 'bg-emerald-500'; - if (lower.includes('on hold') || lower.includes('issue')) return 'bg-rose-500'; - if (lower.includes('sit') || lower.includes('uat')) return 'bg-purple-500'; - const colors = ['bg-emerald-500', 'bg-sky-500', 'bg-rose-500', 'bg-amber-500', 'bg-indigo-500']; + if (lower.includes('on hold') || lower.includes('issue')) return 'bg-amber-500'; + + const colors = ['bg-rose-400', 'bg-orange-400', 'bg-yellow-400', 'bg-emerald-400', 'bg-cyan-400', 'bg-violet-400', 'bg-fuchsia-400']; return colors[index % colors.length]; }; diff --git a/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/ProjectMilestoneTimeline.tsx b/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/ProjectMilestoneTimeline.tsx index 16201dd..ef3fe3b 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/ProjectMilestoneTimeline.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/[assignment_id]/ProjectMilestoneTimeline.tsx @@ -222,15 +222,15 @@ export function ProjectMilestoneTimeline({ {insertTodayAfter === 'start' && ( <> -
+{history.status_remarks}
*/} diff --git a/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/StatusTimeline.tsx b/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/StatusTimeline.tsx index cd76aae..cf0465e 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/StatusTimeline.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/StatusTimeline.tsx @@ -14,6 +14,19 @@ interface StatusTimelineProps { const TIMELINE_PREVIEW_LIMIT = 3; +function getStatusDotColor(name?: string | null): string { + if (!name) return 'bg-his'; + const lower = name.toLowerCase(); + if (lower.includes('development') || lower.includes('dev')) return 'bg-rose-400 dark:bg-rose-600'; + if (lower.includes('system integration') || lower.includes('sit')) return 'bg-orange-400 dark:bg-orange-600'; + if (lower.includes('user acceptance') || lower.includes('uat')) return 'bg-yellow-400 dark:bg-yellow-500'; + if (lower.includes('production trial') || lower.includes('ptr')) return 'bg-emerald-400 dark:bg-emerald-600'; + if (lower.includes('go-live') || lower.includes('go live')) return 'bg-cyan-400 dark:bg-cyan-600'; + if (lower.includes('bast') || lower.includes('handover')) return 'bg-violet-400 dark:bg-violet-600'; + if (lower.includes('warranty')) return 'bg-fuchsia-400 dark:bg-fuchsia-600'; + return 'bg-his'; +} + export default function StatusTimeline({ history }: StatusTimelineProps) { const [showAll, setShowAll] = useState(false); @@ -68,7 +81,7 @@ export default function StatusTimeline({ history }: StatusTimelineProps) { aria-hidden className={cn( 'absolute left-0 top-1 h-3.75 w-3.75 rounded-full border-[3px] border-card', - isCurrent ? 'bg-his' : 'bg-muted-foreground/40' + isCurrent ? getStatusDotColor(entry.project_assignment_status?.name) : 'bg-muted-foreground/40' )} />+ “{item.description}” +
+ )} + +