feat(capa): wire owner notes form into capa-owner page and HSE detail view
This commit is contained in:
@@ -5,6 +5,7 @@ import { createClient } from '@/lib/supabase/server'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { StatCard } from '@/components/dashboard/stat-card'
|
||||
import { CapaOwnerActions } from '@/components/capa/capa-owner-actions'
|
||||
import { CapaOwnerNotesForm } from '@/components/capa/capa-owner-notes-form'
|
||||
|
||||
const STATUS_LABELS: Record<string, string> = {
|
||||
open: 'Open',
|
||||
@@ -36,7 +37,7 @@ export default async function CapaOwnerPage() {
|
||||
|
||||
const { data: capas } = await supabase
|
||||
.from('capa_actions')
|
||||
.select('id, description, due_date, priority, status, incident_id, incidents (reference_no)')
|
||||
.select('id, description, due_date, priority, status, incident_id, owner_notes, incidents (reference_no)')
|
||||
.eq('owner_user_id', user.id)
|
||||
.order('due_date', { ascending: true, nullsFirst: false })
|
||||
|
||||
@@ -99,6 +100,7 @@ export default async function CapaOwnerPage() {
|
||||
<CapaOwnerActions capaId={capa.id} currentStatus={capa.status} />
|
||||
</div>
|
||||
</div>
|
||||
<CapaOwnerNotesForm capaId={capa.id} initialNotes={(capa as { owner_notes: string | null }).owner_notes} />
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user