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:
@@ -97,6 +97,17 @@ export const RepairBatchStatusUpdateSchema = z.object({
|
||||
})
|
||||
export type RepairBatchStatusUpdateInput = z.infer<typeof RepairBatchStatusUpdateSchema>
|
||||
|
||||
// --- Repair Note schemas ---
|
||||
|
||||
export const RepairNoteVisibility = z.enum(['internal', 'customer'])
|
||||
export type RepairNoteVisibility = z.infer<typeof RepairNoteVisibility>
|
||||
|
||||
export const RepairNoteCreateSchema = z.object({
|
||||
content: z.string().min(1),
|
||||
visibility: RepairNoteVisibility.default('internal'),
|
||||
})
|
||||
export type RepairNoteCreateInput = z.infer<typeof RepairNoteCreateSchema>
|
||||
|
||||
// --- Repair Service Template schemas ---
|
||||
|
||||
export const RepairServiceTemplateCreateSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user