feat: update appointment management API and frontend components

- Added new endpoint to get today's appointment statistics with optional date filter.
- Enhanced appointment listing API to support filtering by date and doctor UUID.
- Updated Appointment model to include new fields and modified status values.
- Implemented AppointmentStatusDropdown component for status management with visual feedback.
- Created PersianCalendar component for date selection in Jalali format.
- Updated API documentation to reflect changes in appointment management.
This commit is contained in:
hamed
2026-06-11 14:13:42 +03:30
parent 92a258832b
commit 45ee725820
9 changed files with 1241 additions and 636 deletions
+3 -8
View File
@@ -4,18 +4,13 @@ import type { AppointmentStatus, PaymentStatus, SmsTemplateStatus, SettlementSta
type BadgeColor = 'green' | 'amber' | 'red' | 'blue' | 'violet' | 'gray';
const appointmentMap: Record<AppointmentStatus, { color: BadgeColor; label: string }> = {
waiting_for_payment: { color: 'amber', label: 'انتظار پرداخت' },
reserved: { color: 'blue', label: 'رزرو شده' },
checked_in: { color: 'violet', label: 'ورود به مطب' },
waiting: { color: 'amber', label: 'صف انتظار' },
in_progress: { color: 'blue', label: 'در حال ویزیت' },
visited: { color: 'green', label: 'ویزیت شده' },
pending: { color: 'blue', label: 'رزرو شده' },
confirmed: { color: 'green', label: 'تأیید شده' },
completed: { color: 'green', label: 'تکمیل شده' },
cancelled_by_user: { color: 'red', label: 'لغو بیمار' },
cancelled_by_doctor: { color: 'red', label: 'لغو پزشک' },
cancelled_by_admin: { color: 'red', label: 'لغو ادمین' },
auto_cancel_unpaid: { color: 'gray', label: 'لغو خودکار' },
no_show: { color: 'gray', label: 'غیبت' },
expired: { color: 'gray', label: 'منقضی' },
};
const paymentMap: Record<PaymentStatus, { color: BadgeColor; label: string }> = {