export type Priority = 'critical' | 'high' | 'medium' | 'low'; export type Status = 'todo' | 'inprogress' | 'review' | 'done'; export interface User { id: string; name: string; role: string; email: string; color: string; avatar: string; dept: string; } export interface Subtask { id: string; title: string; done: boolean } export interface Comment { id: string; userId: string; text: string; timestamp: string } export interface Activity { id: string; text: string; timestamp: string } export interface Dependency { id: string; dependsOnUserId: string; description: string; resolved: boolean } export interface Task { id: string; title: string; description: string; status: Status; priority: Priority; assignee: string; reporter: string; dueDate: string; tags: string[]; subtasks: Subtask[]; comments: Comment[]; activity: Activity[]; dependencies: Dependency[]; } export const PRIORITY_COLORS: Record = { critical: { color: '#ef4444', bg: 'rgba(239,68,68,0.13)' }, high: { color: '#f97316', bg: 'rgba(249,115,22,0.13)' }, medium: { color: '#eab308', bg: 'rgba(234,179,8,0.13)' }, low: { color: '#22c55e', bg: 'rgba(34,197,94,0.13)' }, }; export const STATUS_COLORS: Record = { todo: '#64748b', inprogress: '#818cf8', review: '#f59e0b', done: '#22c55e', }; export const STATUS_LABELS: Record = { todo: 'To Do', inprogress: 'In Progress', review: 'Review', done: 'Done', }; export function getUserById(users: User[], id: string) { return users.find(u => u.id === id); }