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