mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat: display manual admin top-ups in sales statistics
This commit is contained in:
@@ -12,6 +12,7 @@ export interface SalesStatsParams {
|
||||
|
||||
export interface SalesSummary {
|
||||
total_revenue_kopeks: number;
|
||||
manual_topup_kopeks: number;
|
||||
active_subscriptions: number;
|
||||
active_trials: number;
|
||||
new_trials: number;
|
||||
|
||||
@@ -15,4 +15,5 @@ export const METHOD_LABELS: Record<string, string> = {
|
||||
kassa_ai: 'Kassa AI',
|
||||
riopay: 'RioPay',
|
||||
severpay: 'SeverPay',
|
||||
manual: 'Ручное пополнение',
|
||||
};
|
||||
|
||||
@@ -1166,7 +1166,8 @@
|
||||
"newTrials": "New Trials",
|
||||
"conversion": "Conversion",
|
||||
"renewals": "Renewals",
|
||||
"addonRevenue": "Add-on Revenue"
|
||||
"addonRevenue": "Add-on Revenue",
|
||||
"manualTopup": "Manual Top-ups"
|
||||
},
|
||||
"trials": {
|
||||
"total": "Total Trials",
|
||||
|
||||
@@ -1000,7 +1000,8 @@
|
||||
"newTrials": "آزمایشی جدید",
|
||||
"conversion": "تبدیل",
|
||||
"renewals": "تمدید",
|
||||
"addonRevenue": "درآمد خدمات اضافی"
|
||||
"addonRevenue": "درآمد خدمات اضافی",
|
||||
"manualTopup": "شارژ دستی"
|
||||
},
|
||||
"trials": {
|
||||
"total": "کل آزمایشی",
|
||||
|
||||
@@ -1187,7 +1187,8 @@
|
||||
"newTrials": "Новые триалы",
|
||||
"conversion": "Конверсия",
|
||||
"renewals": "Продления",
|
||||
"addonRevenue": "Доп. услуги"
|
||||
"addonRevenue": "Доп. услуги",
|
||||
"manualTopup": "Ручные пополнения"
|
||||
},
|
||||
"trials": {
|
||||
"total": "Всего триалов",
|
||||
|
||||
@@ -1000,7 +1000,8 @@
|
||||
"newTrials": "新试用",
|
||||
"conversion": "转化率",
|
||||
"renewals": "续订",
|
||||
"addonRevenue": "附加服务收入"
|
||||
"addonRevenue": "附加服务收入",
|
||||
"manualTopup": "手动充值"
|
||||
},
|
||||
"trials": {
|
||||
"total": "试用总数",
|
||||
|
||||
@@ -82,7 +82,7 @@ export default function AdminSalesStats() {
|
||||
{t('admin.salesStats.loadError')}
|
||||
</div>
|
||||
)}
|
||||
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-7">
|
||||
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-8">
|
||||
<StatCard
|
||||
label={t('admin.salesStats.summary.revenue')}
|
||||
value={
|
||||
@@ -129,6 +129,15 @@ export default function AdminSalesStats() {
|
||||
}
|
||||
valueClassName="text-accent-400"
|
||||
/>
|
||||
<StatCard
|
||||
label={t('admin.salesStats.summary.manualTopup')}
|
||||
value={
|
||||
summaryLoading
|
||||
? '...'
|
||||
: formatWithCurrency((summary?.manual_topup_kopeks ?? 0) / SALES_STATS.KOPEKS_DIVISOR)
|
||||
}
|
||||
valueClassName="text-warning-400"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Tabs */}
|
||||
|
||||
Reference in New Issue
Block a user