- TicketDetailHeader: Display ticket info with status dropdown - TicketNotesFeed: Chronological list of ticket notes with internal flag - TicketAddNote: Form to add notes (requires linked session) - TicketConfigs: Display related configurations/devices - TicketRelated: List of related tickets as clickable buttons All components use type-safe imports from psaContext and integrations APIs. Styling follows design system (flat dark theme, electric blue accent, Tailwind v4). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
921 B
TypeScript
29 lines
921 B
TypeScript
import type { TicketNote } from '@/api/psaContext'
|
|
|
|
interface Props {
|
|
notes: TicketNote[]
|
|
}
|
|
|
|
export function TicketNotesFeed({ notes }: Props) {
|
|
if (notes.length === 0) {
|
|
return <p className="text-xs text-muted-foreground px-4 py-3">No notes yet.</p>
|
|
}
|
|
|
|
return (
|
|
<div className="divide-y divide-default">
|
|
{notes.map((note, i) => (
|
|
<div key={i} className="px-4 py-3 space-y-1">
|
|
<div className="flex items-center justify-between text-xs text-muted-foreground">
|
|
<span>{note.member ?? 'Unknown'}</span>
|
|
<span>{new Date(note.date_created).toLocaleDateString()}</span>
|
|
</div>
|
|
{note.internal_analysis_flag && (
|
|
<span className="text-[10px] uppercase tracking-wider text-warning">Internal</span>
|
|
)}
|
|
<p className="text-sm text-primary whitespace-pre-wrap">{note.text}</p>
|
|
</div>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|