feat(ui): add Print Report button on closed incidents
This commit is contained in:
@@ -188,6 +188,21 @@ export default async function HseIncidentDetailPage({ params }: Props) {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</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 />
|
<ClosurePanel incidentId={id} status={status} canClose canAddAddenda />
|
||||||
<SimilarIncidentsPanel incidentId={id} />
|
<SimilarIncidentsPanel incidentId={id} />
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user