Files
proyectos/src/lib/meta.ts
T

54 lines
2.3 KiB
TypeScript

import type { IssueStatus, IssuePriority, IssueType } from "@/lib/types";
/** Definiciones canónicas para pintar badges y iconos de forma consistente. */
export const STATUS_META: Record<
IssueStatus,
{ label: string; color: string; icon: string; group: string }
> = {
backlog: { label: "Backlog", color: "#6c788b", icon: "bx-radio-circle", group: "Sin iniciar" },
todo: { label: "Por hacer", color: "#6c788b", icon: "bx-radio-circle", group: "Sin iniciar" },
in_progress: { label: "En curso", color: "#d19b3d", icon: "bx-error-circle", group: "En curso" },
in_review: { label: "En revisión", color: "#8c6fd1", icon: "bx-time", group: "En curso" },
done: { label: "Completado", color: "#015fc9", icon: "bx-check-circle", group: "Completado" },
canceled: { label: "Cancelado", color: "#98a2b3", icon: "bx-x-circle", group: "Completado" },
};
export const STATUS_ORDER: IssueStatus[] = [
"backlog",
"todo",
"in_progress",
"in_review",
"done",
"canceled",
];
export const PRIORITY_META: Record<
IssuePriority,
{ label: string; color: string; icon: string; rank: number }
> = {
0: { label: "Sin prioridad", color: "#6c788b", icon: "bx-dots-horizontal-rounded", rank: 0 },
4: { label: "Urgente", color: "#d93025", icon: "bx-error", rank: 1 },
3: { label: "Alta", color: "#e8710a", icon: "bx-up-arrow-alt", rank: 2 },
2: { label: "Media", color: "#d19b3d", icon: "bx-equal", rank: 3 },
1: { label: "Baja", color: "#015fc9", icon: "bx-down-arrow-alt", rank: 4 },
};
export const TYPE_META: Record<IssueType, { label: string; icon: string; color: string }> = {
task: { label: "Tarea", icon: "bx-task", color: "#6c788b" },
bug: { label: "Bug", icon: "bx-bug", color: "#d93025" },
feature: { label: "Feature", icon: "bx-star", color: "#015fc9" },
chore: { label: "Chore", icon: "bx-cog", color: "#6c788b" },
};
export const PROJECT_STATUS_META: Record<
string,
{ label: string; color: string; icon: string }
> = {
planned: { label: "Planificado", color: "#6c788b", icon: "bx-radio-circle" },
in_progress: { label: "En curso", color: "#d19b3d", icon: "bx-error-circle" },
paused: { label: "Pausado", color: "#e8710a", icon: "bx-pause-circle" },
completed: { label: "Completado", color: "#015fc9", icon: "bx-check-circle" },
canceled: { label: "Cancelado", color: "#98a2b3", icon: "bx-x-circle" },
};