'use client'; import type { ReactNode } from 'react'; import { Lock, MessageSquare } from 'lucide-react'; import { PersonInfo } from '@/components/person-avatar'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { cn } from '@/lib/utils'; import type { TicketDetail } from '@/types'; import { formatDateOnly } from '@/utils/date'; function getClosedAt(ticket: TicketDetail) { const approvedEntry = [...(ticket.history ?? [])] .reverse() .find( (item) => item.event_type === 'repair_approved' || item.to_class_status === 'approved', ); return ( approvedEntry?.created_at ?? ticket.reviewer?.reviewed_at ?? ticket.timestamps.updated_at ); } function MetaField({ label, value, valueClassName, }: { label: string; value: ReactNode; valueClassName?: string; }) { return (
{label}
No comments added yet
{comment.trim()}
Review Comment