This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</BoxedIconTitleBlock>
|
</BoxedIconTitleBlock>
|
||||||
|
|
||||||
<SkeletonLoaderBlock v-if="isLoading" :rows="1" :cols-per-row="3" />
|
<SkeletonLoaderBlock v-if="isLoading" :rows="2" :cols-per-row="3" />
|
||||||
<div v-else class="dashboard__stats">
|
<div v-else class="dashboard__stats">
|
||||||
<DashboardStatCard
|
<DashboardStatCard
|
||||||
v-for="(stat, i) in institutionStats"
|
v-for="(stat, i) in institutionStats"
|
||||||
@@ -95,37 +95,50 @@ const ACCESS_LABELS = {
|
|||||||
limited: 'محدود',
|
limited: 'محدود',
|
||||||
}
|
}
|
||||||
|
|
||||||
const formatThousands = (value) => {
|
|
||||||
const n = Number(value ?? 0)
|
|
||||||
return n >= 1000
|
|
||||||
? { value: toFaDigits(Math.round(n / 1000)), unit: 'هزار' }
|
|
||||||
: { value: toFaDigits(n), unit: 'نفر' }
|
|
||||||
}
|
|
||||||
|
|
||||||
const institutionStats = computed(() => {
|
const institutionStats = computed(() => {
|
||||||
const stats = dashboard.value.stats ?? {}
|
const stats = dashboard.value.stats ?? {}
|
||||||
const users = formatThousands(stats.activeUsers)
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
icon: 'user',
|
icon: 'users-three',
|
||||||
label: 'آمار کلی کاربران',
|
label: 'مجموع کل متقاضیان',
|
||||||
value: users.value,
|
value: toFaDigits(stats.totalApplicants ?? 0),
|
||||||
unit: users.unit,
|
unit: 'نفر',
|
||||||
subtitle: 'کاربر فعال',
|
subtitle: 'احراز شده و نشده',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'video',
|
icon: 'clock',
|
||||||
label: 'دوره های ایجاد شده',
|
label: 'کاربران در انتظار ارزیابی',
|
||||||
value: toFaDigits(stats.coursesCreated ?? 0),
|
value: toFaDigits(stats.awaitingEvaluation ?? 0),
|
||||||
unit: 'دوره',
|
unit: 'نفر',
|
||||||
subtitle: 'ایجاد شده',
|
subtitle: 'در انتظار ارزیابی',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'shopping-bag',
|
icon: 'book',
|
||||||
label: 'دوره های فروش رفته',
|
label: 'دانشجویان ترم ۱',
|
||||||
value: toFaDigits(stats.coursesSold ?? 0),
|
value: toFaDigits(stats.term1Students ?? 0),
|
||||||
unit: 'عدد',
|
unit: 'نفر',
|
||||||
subtitle: 'دوره فروش رفته',
|
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: 'تکمیل دوره آموزشی',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,10 +11,12 @@ export const adminDashboard = {
|
|||||||
openTickets: 32,
|
openTickets: 32,
|
||||||
},
|
},
|
||||||
stats: {
|
stats: {
|
||||||
activeUsers: 11_000,
|
totalApplicants: 120,
|
||||||
totalUsers: 11_540,
|
awaitingEvaluation: 18,
|
||||||
coursesCreated: 6,
|
term1Students: 42,
|
||||||
coursesSold: 12,
|
term2Students: 31,
|
||||||
|
term3Students: 24,
|
||||||
|
graduates: 16,
|
||||||
},
|
},
|
||||||
recentRegistrations: [
|
recentRegistrations: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user