feat(capa): restyle the CAPA detail page, verification form, close card, owner actions and notes

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 11:38:44 +08:00
co-authored by Claude Haiku 4.5
parent 572a9c9484
commit 587b580797
7 changed files with 297 additions and 137 deletions
+5 -12
View File
@@ -2,6 +2,7 @@
import { useState } from 'react'
import { useRouter } from 'next/navigation'
import { Button } from '@/components/ui/button'
interface Props {
capaId: string
@@ -33,25 +34,17 @@ export function CapaOwnerActions({ capaId, currentStatus }: Props) {
if (currentStatus === 'open' || currentStatus === 'reopened' || currentStatus === 'overdue') {
return (
<button
onClick={() => updateStatus('in_progress')}
disabled={loading}
className="text-sm px-3 py-1.5 border border-divider hover:bg-gray-50 disabled:opacity-50"
>
<Button variant="secondary" onClick={() => updateStatus('in_progress')} disabled={loading}>
{loading ? '…' : 'Mark In Progress'}
</button>
</Button>
)
}
if (currentStatus === 'in_progress') {
return (
<button
onClick={() => updateStatus('pending_verification')}
disabled={loading}
className="text-sm px-3 py-1.5 bg-accent text-white hover:bg-accent-600 disabled:opacity-50"
>
<Button onClick={() => updateStatus('pending_verification')} disabled={loading}>
{loading ? '…' : 'Submit for Verification'}
</button>
</Button>
)
}