feat(ui): add Print Report button on closed incidents

This commit is contained in:
2026-07-28 17:06:33 +08:00
parent 1b0941ec69
commit 28929f40e2
@@ -188,6 +188,21 @@ export default async function HseIncidentDetailPage({ params }: Props) {
</a>
</div>
)}
{status === 'closed' && (
<div className="mt-4 flex gap-3 flex-wrap">
<a
href={`/api/incidents/${id}/report-pdf`}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-1.5 px-3 py-1.5 bg-green-600 text-white text-xs font-semibold rounded-lg hover:bg-green-700 transition-colors"
>
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
<path strokeLinecap="round" strokeLinejoin="round" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
Print Report
</a>
</div>
)}
<ClosurePanel incidentId={id} status={status} canClose canAddAddenda />
<SimilarIncidentsPanel incidentId={id} />
</main>