Add repair notes journal with running feed, visibility, and status tagging

New repair_note table for timestamped journal entries on tickets. Each
note captures author, content, visibility (internal or customer-facing),
and the ticket status at time of writing. Notes display as a running
feed on the ticket detail page with newest first. Internal notes have
a lock icon, customer-visible notes highlighted in blue. Supports add
and delete with appropriate permission gating.
This commit is contained in:
Ryan Moon
2026-03-29 10:27:39 -05:00
parent 01cff80f2b
commit 7eac03f6c2
11 changed files with 334 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import {
import { usePagination } from '@/hooks/use-pagination'
import { StatusProgress } from '@/components/repairs/status-progress'
import { TicketPhotos } from '@/components/repairs/ticket-photos'
import { TicketNotes } from '@/components/repairs/ticket-notes'
import { DataTable, type Column } from '@/components/shared/data-table'
import { Button } from '@/components/ui/button'
import { Badge } from '@/components/ui/badge'
@@ -334,6 +335,16 @@ function RepairTicketDetailPage() {
</CardContent>
</Card>
{/* Notes Journal */}
<Card>
<CardHeader>
<CardTitle className="text-lg">Notes</CardTitle>
</CardHeader>
<CardContent>
<TicketNotes ticketId={ticketId} />
</CardContent>
</Card>
{/* Line Items */}
<Card>
<CardHeader className="flex flex-row items-center justify-between">