From 32e97a759109ab959fb06ae6fdc07f0b243c927d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 30 Jul 2026 14:16:10 +0000 Subject: [PATCH] Revert "feat: update admin dashboard statistics" This reverts commit fe1fb6cfa47f471986f4c6201ae5b86a06f18eb4. --- .../admin/pages/AdminDashboardPage.vue | 61 ++++++++----------- src/services/mock/fixtures/admin-dashboard.js | 10 ++- 2 files changed, 28 insertions(+), 43 deletions(-) diff --git a/src/features/admin/pages/AdminDashboardPage.vue b/src/features/admin/pages/AdminDashboardPage.vue index 834dced..df427bd 100644 --- a/src/features/admin/pages/AdminDashboardPage.vue +++ b/src/features/admin/pages/AdminDashboardPage.vue @@ -9,7 +9,7 @@ - +
{ + const n = Number(value ?? 0) + return n >= 1000 + ? { value: toFaDigits(Math.round(n / 1000)), unit: 'هزار' } + : { value: toFaDigits(n), unit: 'نفر' } +} + const institutionStats = computed(() => { const stats = dashboard.value.stats ?? {} + const users = formatThousands(stats.activeUsers) return [ { - icon: 'users-three', - label: 'مجموع کل متقاضیان', - value: toFaDigits(stats.totalApplicants ?? 0), - unit: 'نفر', - subtitle: 'احراز شده و نشده', + icon: 'user', + label: 'آمار کلی کاربران', + value: users.value, + unit: users.unit, + subtitle: 'کاربر فعال', }, { - icon: 'clock', - label: 'کاربران در انتظار ارزیابی', - value: toFaDigits(stats.awaitingEvaluation ?? 0), - unit: 'نفر', - subtitle: 'در انتظار ارزیابی', + icon: 'video', + label: 'دوره های ایجاد شده', + value: toFaDigits(stats.coursesCreated ?? 0), + unit: 'دوره', + subtitle: 'ایجاد شده', }, { - icon: 'book', - label: 'دانشجویان ترم ۱', - value: toFaDigits(stats.term1Students ?? 0), - unit: 'نفر', - subtitle: 'ترم اول', - }, - { - icon: 'book', - label: 'دانشجویان ترم ۲', - value: toFaDigits(stats.term2Students ?? 0), - unit: 'نفر', - subtitle: 'ترم دوم', - }, - { - icon: 'book', - label: 'دانشجویان ترم ۳', - value: toFaDigits(stats.term3Students ?? 0), - unit: 'نفر', - subtitle: 'ترم سوم', - }, - { - icon: 'certificate', - label: 'فارغ‌التحصیلان', - value: toFaDigits(stats.graduates ?? 0), - unit: 'نفر', - subtitle: 'تکمیل دوره آموزشی', + icon: 'shopping-bag', + label: 'دوره های فروش رفته', + value: toFaDigits(stats.coursesSold ?? 0), + unit: 'عدد', + subtitle: 'دوره فروش رفته', }, ] }) diff --git a/src/services/mock/fixtures/admin-dashboard.js b/src/services/mock/fixtures/admin-dashboard.js index 76dbc3b..a37164c 100644 --- a/src/services/mock/fixtures/admin-dashboard.js +++ b/src/services/mock/fixtures/admin-dashboard.js @@ -11,12 +11,10 @@ export const adminDashboard = { openTickets: 32, }, stats: { - totalApplicants: 120, - awaitingEvaluation: 18, - term1Students: 42, - term2Students: 31, - term3Students: 24, - graduates: 16, + activeUsers: 11_000, + totalUsers: 11_540, + coursesCreated: 6, + coursesSold: 12, }, recentRegistrations: [ {