diff --git a/assets/admin/components/ui/ConfirmDialog.tsx b/assets/admin/components/ui/ConfirmDialog.tsx index f031428b..1b9d298e 100644 --- a/assets/admin/components/ui/ConfirmDialog.tsx +++ b/assets/admin/components/ui/ConfirmDialog.tsx @@ -12,6 +12,8 @@ interface Props { loading?: boolean; onConfirm: () => void; onCancel: () => void; + /** محتوای اضافه زیر پیام (مثلاً فیلد دلیل). */ + children?: React.ReactNode; } export default function ConfirmDialog({ @@ -24,6 +26,7 @@ export default function ConfirmDialog({ loading = false, onConfirm, onCancel, + children, }: Props) { if (!open) return null; @@ -48,6 +51,7 @@ export default function ConfirmDialog({

{message}

+ {children}
+ +
+

تاریخچه رویدادها

+ {eventsQuery.isLoading ? ( +
+ ) : events.length === 0 ? ( +

رویدادی برای این نوبت ثبت نشده است.

+ ) : ( +
    + {events.map((ev, i) => ( +
  1. + +
    +
    + {ev.title} + {formatDateTime(ev.created_at)} +
    + {ev.actor_name && ( +
    توسط: {ev.actor_name}
    + )} + {ev.reason && ( +
    دلیل: {ev.reason}
    + )} +
    +
  2. + ))} +
+ )} +
) : (
@@ -176,8 +219,20 @@ export default function AppointmentDetailPage() { danger loading={cancelMutation.isPending} onConfirm={() => cancelMutation.mutate()} - onCancel={() => setCancelOpen(false)} - /> + onCancel={() => { setCancelOpen(false); setCancelReason(''); }} + > +
+ +