feat(capa): add Close CAPA button for HSE after verification

Verified CAPAs now show a Close button on the detail page for
HSE/admin, transitioning status to closed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 11:41:56 +08:00
co-authored by Claude Sonnet 4.6
parent 1a813d54f2
commit 71cf90e1de
2 changed files with 54 additions and 0 deletions
+5
View File
@@ -4,6 +4,7 @@ import { notFound, redirect } from 'next/navigation'
import Link from 'next/link'
import { createClient } from '@/lib/supabase/server'
import { VerifyForm } from '@/components/capa/verify-form'
import { CloseCapaButton } from '@/components/capa/close-capa-button'
interface Props {
params: Promise<{ id: string }>
@@ -95,6 +96,10 @@ export default async function CapaDetailPage({ params }: Props) {
{isHse && status === 'pending_verification' && (
<VerifyForm capaId={id} />
)}
{isHse && status === 'verified' && (
<CloseCapaButton capaId={id} />
)}
</main>
)
}