diff --git a/src/pages/AdminLandingStats.tsx b/src/pages/AdminLandingStats.tsx index 34e3025..0c725af 100644 --- a/src/pages/AdminLandingStats.tsx +++ b/src/pages/AdminLandingStats.tsx @@ -26,12 +26,20 @@ import { useCurrency } from '../hooks/useCurrency'; import { useChartColors } from '../hooks/useChartColors'; import { CHART_COMMON } from '../constants/charts'; import { AdminBackButton } from '../components/admin'; +import { StatCard } from '../components/stats'; import { ChartIcon, EmailIcon, TelegramSmallIcon, ArrowRightIcon, GiftIcon, + EyeIcon, + CheckCircleIcon, + BanknotesIcon, + PercentIcon, + TicketIcon, + CardIcon, + WalletIcon, ChevronLeftIcon as ChevronLeftSmall, ChevronRightIcon as ChevronRightSmall, } from '@/components/icons'; @@ -339,39 +347,62 @@ export default function AdminLandingStats() {
{/* Summary Cards */}
-
-
- {stats.total_created} - / - {stats.total_successful} -
-
- {t('admin.landings.stats.created', 'Created')} /{' '} - {t('admin.landings.stats.paid', 'paid')} -
-
-
-
- {formatWithCurrency(stats.total_revenue_kopeks / CHART_COMMON.KOPEKS_DIVISOR)} -
-
{t('admin.landings.stats.revenue')}
-
-
-
{stats.total_gifts}
-
{t('admin.landings.stats.giftPurchases')}
-
-
-
- {stats.conversion_rate}% -
-
{t('admin.landings.stats.conversionRate')}
-
+ } + tone="warning" + /> + } + tone="success" + /> + } + tone="success" + /> + } + tone="accent" + /> +
+ + {/* Breakdown Cards */} +
+ } + tone="accent" + /> + } + /> + } + tone="accent" + /> + } + />
{/* Charts */}
{/* Daily Purchases & Revenue */} -
+

{t('admin.landings.stats.dailyChart')}

@@ -501,7 +532,7 @@ export default function AdminLandingStats() {
{/* Daily Purchases Bar Chart */} -
+

{t('admin.landings.stats.dailyPurchases', 'Daily purchases')}

@@ -557,7 +588,7 @@ export default function AdminLandingStats() {
{/* Tariff Distribution -- full width */} -
+

{t('admin.landings.stats.tariffChart')}

@@ -614,39 +645,9 @@ export default function AdminLandingStats() { )}
- {/* Additional Stats Row */} -
-
-
- {t('admin.landings.stats.avgPurchase')} -
-
- {formatWithCurrency(stats.avg_purchase_kopeks / CHART_COMMON.KOPEKS_DIVISOR)} -
-
-
-
- {t('admin.landings.stats.regularPurchases')} -
-
{stats.total_regular}
-
-
-
{t('admin.landings.stats.funnel')}
-
- {stats.total_created}{' '} - {t('admin.landings.stats.created')} - {' / '} - {stats.total_successful}{' '} - - {t('admin.landings.stats.paid', 'paid')} - -
-
-
- {/* Gift vs Regular Donut */} {stats.total_purchases > 0 && ( -
+

{t('admin.landings.stats.giftBreakdown')}

@@ -706,7 +707,7 @@ export default function AdminLandingStats() { )} {/* Purchases List */} -
+
{/* Header row: title + status filter */}

{t('admin.landings.purchases.title')}