feat(appointment): log cancellation events and show them in a Timeline
Introduce the first per-appointment event system. On cancel (via the status
or general update endpoints) an AppointmentEvent (type=cancelled, «نوبت لغو
شد») is recorded with the actor, cancel time, and an optional cancel_reason,
plus a warning-level app_log entry. New GET /appointment/{uuid}/events
returns the ordered event list. The admin appointment detail page renders a
Timeline section and the cancel dialog now collects an optional reason.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,14 @@ export interface Appointment {
|
||||
staff?: { uuid: string; full_name: string } | null;
|
||||
}
|
||||
|
||||
export interface AppointmentEvent {
|
||||
type: string;
|
||||
title: string;
|
||||
actor_name: string | null;
|
||||
reason: string | null;
|
||||
created_at: number;
|
||||
}
|
||||
|
||||
export type PaymentStatus =
|
||||
| "pending"
|
||||
| "success"
|
||||
|
||||
Reference in New Issue
Block a user