2026-04-20 15:10:54 +02:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { Badge } from "@/components/ui/badge";
|
|
|
|
|
|
|
|
|
|
interface PriorityIndicatorProps {
|
|
|
|
|
priority: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const priorityColors: Record<number, string> = {
|
2026-06-16 06:57:00 +02:00
|
|
|
0: "bg-red-200 text-red-700 text-xs",
|
|
|
|
|
1: "bg-orange-200 text-orange-700 text-xs",
|
|
|
|
|
2: "bg-blue-200 text-blue-700 text-xs",
|
|
|
|
|
3: "bg-gray-200 text-gray-700 text-xs",
|
2026-04-20 15:10:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const priorityLabels: Record<number, string> = {
|
2026-06-16 06:57:00 +02:00
|
|
|
0: "P0 - Highest",
|
|
|
|
|
1: "P1 - High",
|
|
|
|
|
2: "P2 - Medium",
|
|
|
|
|
3: "P3 - Low",
|
2026-04-20 15:10:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export function PriorityIndicator({ priority }: PriorityIndicatorProps) {
|
|
|
|
|
return (
|
2026-06-16 06:57:00 +02:00
|
|
|
<Badge className={priorityColors[priority] ?? priorityColors[2]}>
|
|
|
|
|
{priorityLabels[priority] ?? "P2 - Medium"}
|
2026-04-20 15:10:54 +02:00
|
|
|
</Badge>
|
|
|
|
|
);
|
|
|
|
|
}
|