feat: enhance sales stats with device stats, per-tariff charts, and dual-series trials

- Add DualAreaChart component for two-series visualization (registrations vs trials)
- Add MultiSeriesAreaChart component for N-series tariff breakdown with dynamic pivoting
- AddonsTab: add device purchases and device revenue stat cards
- SalesTab: add per-tariff daily sales chart using MultiSeriesAreaChart
- TrialsTab: replace single-series area chart with dual-series registrations + trials chart
- Update TypeScript interfaces to match backend schema changes
- Add i18n keys for all new UI elements across en, ru, zh, fa locales
This commit is contained in:
Fringg
2026-03-02 21:42:25 +03:00
parent 14e5f436ce
commit 4622b4b200
11 changed files with 391 additions and 18 deletions

View File

@@ -1106,10 +1106,12 @@
},
"trials": {
"total": "Total Trials",
"totalRegistrations": "Registrations",
"trialsIssued": "Trials Issued",
"conversion": "Conversion Rate",
"avgDuration": "Avg Duration",
"byProvider": "By Registration Source",
"dailyChart": "Daily Registrations",
"dailyChart": "Daily Registrations & Trials",
"registrations": "Registrations"
},
"sales": {
@@ -1118,7 +1120,9 @@
"topTariff": "Top Tariff",
"byTariff": "Sales by Tariff",
"byPeriod": "By Subscription Period",
"dailyChart": "Daily Sales"
"dailyChart": "Daily Sales",
"dailyByTariff": "Sales by Tariff per Day",
"subscriptions": "Subscriptions"
},
"renewals": {
"total": "Total Renewals",
@@ -1134,6 +1138,8 @@
"totalPurchases": "Total Purchases",
"totalGb": "Total Traffic",
"revenue": "Revenue",
"devicePurchases": "Device Purchases",
"deviceRevenue": "Device Revenue",
"byPackage": "By Package Size",
"dailyChart": "Daily Purchases",
"purchases": "Purchases"

View File

@@ -929,10 +929,12 @@
},
"trials": {
"total": "کل آزمایشی",
"totalRegistrations": "ثبت‌نام‌ها",
"trialsIssued": "آزمایشی صادرشده",
"conversion": "نرخ تبدیل",
"avgDuration": "میانگین مدت",
"byProvider": "بر اساس منبع",
"dailyChart": "ثبت‌نام روزانه",
"dailyChart": "ثبت‌نام و آزمایشی روزانه",
"registrations": "ثبت‌نام"
},
"sales": {
@@ -941,7 +943,9 @@
"topTariff": "تعرفه برتر",
"byTariff": "بر اساس تعرفه",
"byPeriod": "بر اساس دوره",
"dailyChart": "فروش روزانه"
"dailyChart": "فروش روزانه",
"dailyByTariff": "فروش روزانه بر اساس تعرفه",
"subscriptions": "اشتراک‌ها"
},
"renewals": {
"total": "کل تمدیدها",
@@ -957,6 +961,8 @@
"totalPurchases": "کل خرید",
"totalGb": "کل ترافیک",
"revenue": "درآمد",
"devicePurchases": "خرید دستگاه",
"deviceRevenue": "درآمد دستگاه",
"byPackage": "بر اساس بسته",
"dailyChart": "خرید روزانه",
"purchases": "خرید"

View File

@@ -1127,10 +1127,12 @@
},
"trials": {
"total": "Всего триалов",
"totalRegistrations": "Регистрации",
"trialsIssued": "Выданные триалы",
"conversion": "Конверсия",
"avgDuration": "Средняя длит.",
"byProvider": "По источнику регистрации",
"dailyChart": "Регистрации по дням",
"dailyChart": "Регистрации и триалы по дням",
"registrations": "Регистрации"
},
"sales": {
@@ -1139,7 +1141,9 @@
"topTariff": "Топ тариф",
"byTariff": "Продажи по тарифам",
"byPeriod": "По периоду подписки",
"dailyChart": "Продажи по дням"
"dailyChart": "Продажи по дням",
"dailyByTariff": "Продажи по тарифам по дням",
"subscriptions": "Подписки"
},
"renewals": {
"total": "Всего продлений",
@@ -1155,6 +1159,8 @@
"totalPurchases": "Всего покупок",
"totalGb": "Всего трафика",
"revenue": "Доход",
"devicePurchases": "Покупки устройств",
"deviceRevenue": "Доход от устройств",
"byPackage": "По размеру пакета",
"dailyChart": "Покупки по дням",
"purchases": "Покупки"

View File

@@ -929,10 +929,12 @@
},
"trials": {
"total": "试用总数",
"totalRegistrations": "注册数",
"trialsIssued": "已发放试用",
"conversion": "转化率",
"avgDuration": "平均时长",
"byProvider": "按注册来源",
"dailyChart": "每日注册",
"dailyChart": "每日注册与试用",
"registrations": "注册"
},
"sales": {
@@ -941,7 +943,9 @@
"topTariff": "热门套餐",
"byTariff": "按套餐",
"byPeriod": "按订阅周期",
"dailyChart": "每日销售"
"dailyChart": "每日销售",
"dailyByTariff": "每日按套餐销售",
"subscriptions": "订阅"
},
"renewals": {
"total": "续订总数",
@@ -957,6 +961,8 @@
"totalPurchases": "购买总数",
"totalGb": "总流量",
"revenue": "收入",
"devicePurchases": "设备购买",
"deviceRevenue": "设备收入",
"byPackage": "按套餐大小",
"dailyChart": "每日购买",
"purchases": "购买"