-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
71 lines (61 loc) · 1.86 KB
/
Copy pathtypes.ts
File metadata and controls
71 lines (61 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
export enum TaskStatus {
BACKLOG = 'BACKLOG',
IN_PROGRESS = 'IN_PROGRESS',
REVIEW = 'REVIEW',
DONE = 'DONE',
}
export interface Tag {
id: string;
name: string;
color: string; // Tailwind color class mostly
}
export interface Subtask {
id: string;
title: string;
completed: boolean;
}
export type Priority = 'HIGH' | 'MEDIUM' | 'LOW' | null;
export interface Task {
id: string;
title: string;
description: string; // Markdown supported
status: TaskStatus;
tags: Tag[];
createdAt: number;
updatedAt: number;
projectId?: string;
locallyModified?: boolean;
order?: number; // For manual ordering within same status
dueDate?: number | null; // Timestamp for due date
priority?: Priority;
subtasks?: Subtask[];
}
export interface Project {
id: string;
name: string;
color: string;
updatedAt?: number;
}
export type ViewMode = 'KANBAN' | 'LIST';
export const INITIAL_TAGS: Tag[] = [
{ id: '1', name: 'Bug Fix', color: 'bg-red-500/20 text-red-300 border-red-500/30' },
{ id: '2', name: 'Feature', color: 'bg-emerald-500/20 text-emerald-300 border-emerald-500/30' },
{ id: '3', name: 'Deep Work', color: 'bg-indigo-500/20 text-indigo-300 border-indigo-500/30' },
{ id: '4', name: 'Meeting', color: 'bg-amber-500/20 text-amber-300 border-amber-500/30' },
];
export const STATUS_LABELS: Record<TaskStatus, string> = {
[TaskStatus.BACKLOG]: 'Backlog',
[TaskStatus.IN_PROGRESS]: 'In Progress',
[TaskStatus.REVIEW]: 'Review',
[TaskStatus.DONE]: 'Done',
};
export const PRIORITY_LABELS: Record<NonNullable<Priority>, string> = {
HIGH: 'High',
MEDIUM: 'Medium',
LOW: 'Low',
};
export const PRIORITY_COLORS: Record<NonNullable<Priority>, string> = {
HIGH: 'bg-red-500/20 text-red-300 border-red-500/30',
MEDIUM: 'bg-amber-500/20 text-amber-300 border-amber-500/30',
LOW: 'bg-emerald-500/20 text-emerald-300 border-emerald-500/30',
};