refactor(ticket): extract defect class status metadata

This commit is contained in:
2026-06-26 10:38:38 +05:30
parent 1f8ca87bd0
commit 063f963fd4
7 changed files with 90 additions and 26 deletions

View File

@@ -10,9 +10,11 @@ import { PermissionGuard } from '@/guards';
import type { TicketDetail } from '@/types';
import { TicketStatusBadge } from '../../components/TicketStatusBadge';
import { DefectClassStatusLegend } from './DefectClassStatusLegend';
export function TicketDetailHeader({ ticket }: { ticket: TicketDetail }) {
const router = useRouter();
const ticketLabel = ticket.ticket_name
return (
<div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
@@ -23,7 +25,8 @@ export function TicketDetailHeader({ ticket }: { ticket: TicketDetail }) {
</h1>
<TicketStatusBadge status={ticket.status} />
</div>
<p className="text-xs ">Ticket ID: {ticket.id}</p>
<p className="text-xs ">Ticket: {ticketLabel}</p>
<DefectClassStatusLegend />
</div>
<div className="flex shrink-0 items-center gap-2">