mirror of
https://github.com/mosh-hamedani/helpdesk.git
synced 2026-05-21 11:58:19 +02:00
Use categoryLabel constant for ticket category display
Replace inline string manipulation with the shared categoryLabel lookup from core constants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
234e9e8b8b
commit
2de04010a9
|
|
@ -11,6 +11,7 @@ import {
|
|||
flexRender,
|
||||
} from "@tanstack/react-table";
|
||||
import { type Ticket } from "core/constants/ticket.ts";
|
||||
import { categoryLabel } from "core/constants/ticket-category.ts";
|
||||
import ErrorAlert from "@/components/ErrorAlert";
|
||||
import StatusBadge from "@/components/StatusBadge";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
|
|
@ -78,7 +79,7 @@ const columns: ColumnDef<Ticket>[] = [
|
|||
cell: ({ row }) =>
|
||||
row.original.category ? (
|
||||
<Badge variant="secondary">
|
||||
{row.original.category.replace(/_/g, " ")}
|
||||
{categoryLabel[row.original.category]}
|
||||
</Badge>
|
||||
) : (
|
||||
"—"
|
||||
|
|
|
|||
Loading…
Reference in a new issue