feat(ticket): refine repair report and history timeline UI
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
'use client';
|
||||
|
||||
import type { TicketDetail } from '@/types';
|
||||
|
||||
import { RepairNotesCard } from './repair-report/RepairNotesCard';
|
||||
import { RepairProofImagesGrid } from './repair-report/RepairProofImagesGrid';
|
||||
import { RepairProofVideoCard } from './repair-report/RepairProofVideoCard';
|
||||
import { ReviewerCommentsCard } from './repair-report/ReviewerCommentsCard';
|
||||
|
||||
export function TicketRepairReportCard({ ticket }: { ticket: TicketDetail }) {
|
||||
const repair = ticket.repair;
|
||||
|
||||
return (
|
||||
<section className="space-y-4">
|
||||
<h2 className="text-base font-semibold text-foreground">
|
||||
Evidence & Progress
|
||||
</h2>
|
||||
|
||||
<div className="space-y-4">
|
||||
<RepairProofVideoCard
|
||||
ticketId={ticket.id}
|
||||
proofVideoUrl={repair?.proof_video_url ?? null}
|
||||
hasRepair={Boolean(repair)}
|
||||
/>
|
||||
|
||||
<RepairProofImagesGrid
|
||||
imageUrls={repair?.proof_image_urls ?? []}
|
||||
submittedAt={repair?.submitted_at ?? null}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 lg:grid-cols-2">
|
||||
<RepairNotesCard notes={repair?.notes ?? null} worker={ticket.worker} />
|
||||
<ReviewerCommentsCard
|
||||
reviewer={ticket.reviewer}
|
||||
status={ticket.status}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user