Files
scrum-manager/src/data.ts
tusuii c604df281d feat: add more roles (tech_lead, scrum_master, product_owner, designer, qa)
- Registration form: added 5 new role options to dropdown
- Sidebar: new roles get proper nav access via ALL_ROLES/LEADER_ROLES
- Dashboard: isLeader check expanded to include new leadership roles
- Shared/Pages: role badge colors added for all new roles
- Invite modal: expanded role dropdown
2026-02-16 12:31:54 +05:30

36 lines
1.5 KiB
TypeScript

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<Priority, { color: string; bg: string }> = {
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<Status, string> = {
todo: '#64748b', inprogress: '#818cf8', review: '#f59e0b', done: '#22c55e',
};
export const STATUS_LABELS: Record<Status, string> = {
todo: 'To Do', inprogress: 'In Progress', review: 'Review', done: 'Done',
};
export function getUserById(users: User[], id: string) { return users.find(u => u.id === id); }