feat(ticket): refine repair report and history timeline UI

This commit is contained in:
2026-06-19 11:22:41 +05:30
parent 8c3d19a429
commit a567a52e26
27 changed files with 1550 additions and 363 deletions

View File

@@ -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>
);
}