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:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useState } from 'react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { Button } from '@/components/ui/button'
|
||||
|
||||
interface Props {
|
||||
capaId: string
|
||||
@@ -31,19 +32,21 @@ export function CloseCapaButton({ capaId }: Props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="border border-divider p-5 space-y-3 bg-neutral-100">
|
||||
<h3 className="text-sm font-semibold text-gray-800">Close CAPA</h3>
|
||||
<p className="text-sm text-gray-600">
|
||||
This CAPA has been verified as effective. Close it to mark it fully resolved.
|
||||
</p>
|
||||
{error && <p className="text-sm text-red-600">{error}</p>}
|
||||
<button
|
||||
onClick={handleClose}
|
||||
disabled={loading}
|
||||
className="w-full bg-accent text-white py-2 text-sm font-semibold hover:bg-accent-700 disabled:opacity-50"
|
||||
>
|
||||
<div className="space-y-3 rounded-xl bg-surface p-5 shadow-card">
|
||||
<div>
|
||||
<h3 className="text-sm font-semibold">Close CAPA</h3>
|
||||
<p className="mt-0.5 text-xs text-muted">
|
||||
This CAPA has been verified as effective. Close it to mark it fully resolved.
|
||||
</p>
|
||||
</div>
|
||||
{error && (
|
||||
<p role="alert" className="rounded-md bg-st-red-bg px-3 py-2 text-[13px] text-st-red-fg">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
<Button onClick={handleClose} disabled={loading}>
|
||||
{loading ? 'Closing…' : 'Close CAPA'}
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user