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:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user