operation-cycle / teamtasker /src /lib /constants.ts
o134's picture
Upload full TeamTasker system with all fixes
8314cf4 verified
Raw
History Blame Contribute Delete
3.72 kB
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";
}