Spaces:
Sleeping
Sleeping
File size: 3,719 Bytes
8314cf4 | 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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | export const TASK_STATUSES: Record<string, string> = {
not_started: "لم يبدأ",
in_progress: "قيد التنفيذ",
review: "قيد المراجعة",
completed: "تم الإنجاز",
};
export const TASK_STATUS_OPTIONS = [
{ value: "not_started", label: "لم يبدأ" },
{ value: "in_progress", label: "قيد التنفيذ" },
{ value: "review", label: "قيد المراجعة" },
{ value: "completed", label: "تم الإنجاز" },
];
export const PRIORITY_OPTIONS = [
{ value: "low", label: "منخفض" },
{ value: "medium", label: "متوسط" },
{ value: "high", label: "عالي" },
{ value: "urgent", label: "عاجل" },
];
export const TEAMS = [
"Account Manager",
"Creative",
"SEO Specialist",
"Media Buying",
"Social Media",
"Operation",
] as const;
export const ALL_TASK_TYPES = [
"UI Design",
"Campaign Design",
"Video Editing",
"Motion Graphics",
"Social Media Plan Design",
"Client Task",
"Modification",
"Follow-up",
];
// Smart routing: which teams each FROM team can assign to
export const TEAM_ROUTING: Record<string, readonly string[]> = {
"SEO Specialist": ["Creative"],
"Media Buying": ["Creative"],
"Social Media": ["Creative"],
"Account Manager": ["Media Buying", "SEO Specialist", "Operation"],
"Creative": ["Account Manager", "SEO Specialist", "Media Buying", "Social Media", "Operation"],
"Operation": ["Account Manager", "Creative", "SEO Specialist", "Media Buying", "Social Media"],
};
// Task types by from→to route
export const TASK_TYPES_BY_ROUTE: Record<string, string[]> = {
"SEO Specialist→Creative": ["UI Design"],
"Media Buying→Creative": ["Campaign Design", "Video Editing", "Motion Graphics"],
"Social Media→Creative": ["Social Media Plan Design"],
"Account Manager→Media Buying": ["Client Task"],
"Account Manager→SEO Specialist": ["Client Task"],
"Account Manager→Operation": ["Client Task"],
"Account Manager→Creative": ["Modification"],
"Account Manager→Social Media": ["Follow-up"],
};
export function getStatusColor(status: string): string {
switch (status) {
case "not_started": return "text-slate-600 bg-slate-100 border-slate-200";
case "in_progress": return "text-blue-700 bg-blue-50 border-blue-200";
case "review": return "text-purple-700 bg-purple-50 border-purple-200";
case "completed": return "text-green-700 bg-green-50 border-green-200";
default: return "text-slate-600 bg-slate-100 border-slate-200";
}
}
export function getPriorityColor(priority: string): string {
switch (priority) {
case "low": return "text-green-700 bg-green-50 border-green-200";
case "medium": return "text-yellow-700 bg-yellow-50 border-yellow-200";
case "high": return "text-orange-700 bg-orange-50 border-orange-200";
case "urgent": return "text-red-700 bg-red-50 border-red-200";
default: return "text-slate-600 bg-slate-100 border-slate-200";
}
}
export function getPriorityBorderColor(priority: string): string {
switch (priority) {
case "urgent": return "border-l-4 border-l-red-500";
case "high": return "border-l-4 border-l-orange-400";
case "medium": return "border-l-4 border-l-blue-400";
case "low": return "border-l-4 border-l-slate-300";
default: return "border-l-4 border-l-slate-200";
}
}
export function getTeamColor(team: string): string {
const colors: Record<string, string> = {
"Account Manager": "#6366f1",
"Creative": "#ec4899",
"SEO Specialist": "#06b6d4",
"Media Buying": "#f97316",
"Social Media": "#84cc16",
"Operation": "#a855f7",
};
return colors[team] || "#94a3b8";
}
|