feat: add admin UI for reviewing pending student registrations.

Let staff list, inspect, approve, or reject enrollment and class-request submissions before final enrollment.
This commit is contained in:
2026-08-16 08:42:26 +03:30
parent e977ccd356
commit e87d78c295
7 changed files with 405 additions and 2 deletions
+16
View File
@@ -49,6 +49,14 @@ const PAYMENT_LABELS = {
overdue: 'معوق'
};
const PENDING_STUDENT_LABELS = {
pending_payment: 'در انتظار پرداخت',
pending_review: 'در انتظار بررسی',
approved: 'تأییدشده',
rejected: 'ردشده',
cancelled: 'لغوشده'
};
const severity = computed(() => {
const val = String(props.status).toLowerCase();
@@ -79,6 +87,13 @@ const severity = computed(() => {
if (val === 'failed' || val === 'ناموفق') return 'danger';
}
if (props.type === 'pendingStudent') {
if (val === 'pending_review') return 'warning';
if (val === 'pending_payment') return 'info';
if (val === 'approved') return 'success';
if (val === 'rejected' || val === 'cancelled') return 'danger';
}
if (val === 'true' || val === 'active' || val === 'فعال') return 'success';
if (val === 'false' || val === 'inactive' || val === 'غیرفعال') return 'danger';
@@ -93,6 +108,7 @@ const label = computed(() => {
if (props.type === 'contact') return CONTACT_LABELS[val] || raw;
if (props.type === 'notification') return NOTIFICATION_LABELS[val] || raw;
if (props.type === 'payment') return PAYMENT_LABELS[val] || raw;
if (props.type === 'pendingStudent') return PENDING_STUDENT_LABELS[val] || raw;
if (val === 'true' || val === 'active') return 'فعال';
if (val === 'false' || val === 'inactive') return 'غیرفعال';