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:
@@ -1,6 +1,8 @@
|
||||
'use client'
|
||||
|
||||
import { useState } from 'react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Field, Textarea } from '@/components/ui/field'
|
||||
|
||||
interface Props {
|
||||
capaId: string
|
||||
@@ -32,25 +34,22 @@ export function CapaOwnerNotesForm({ capaId, initialNotes }: Props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-3 space-y-1">
|
||||
<label className="text-xs text-gray-500 font-medium">Remarks / Notes</label>
|
||||
<textarea
|
||||
value={notes}
|
||||
onChange={e => { setNotes(e.target.value); setSaved(false) }}
|
||||
rows={2}
|
||||
placeholder="Add any notes or updates for this action…"
|
||||
className="w-full border border-divider px-3 py-2 text-sm text-gray-800 resize-none focus:outline-none focus:ring-2 focus:ring-accent"
|
||||
/>
|
||||
{error && <p className="text-xs text-red-600">{error}</p>}
|
||||
<div className="mt-3 space-y-2">
|
||||
<Field label="Remarks / Notes" htmlFor={`notes-${capaId}`}>
|
||||
<Textarea
|
||||
id={`notes-${capaId}`}
|
||||
value={notes}
|
||||
onChange={e => { setNotes(e.target.value); setSaved(false) }}
|
||||
rows={2}
|
||||
placeholder="Add any notes or updates for this action…"
|
||||
/>
|
||||
</Field>
|
||||
{error && <p role="alert" className="text-xs text-danger">{error}</p>}
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={handleSave}
|
||||
disabled={saving}
|
||||
className="text-xs px-3 py-1 bg-gray-800 text-white hover:bg-gray-700 disabled:opacity-50"
|
||||
>
|
||||
<Button variant="secondary" onClick={handleSave} disabled={saving}>
|
||||
{saving ? 'Saving…' : 'Save Notes'}
|
||||
</button>
|
||||
{saved && <span className="text-xs text-ink">Saved</span>}
|
||||
</Button>
|
||||
{saved && <span className="text-xs text-st-green-fg">Saved</span>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user