mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat(landing-stats): rebuild charts on shared components + add funnel & breakdowns
The landing stats page rendered raw recharts by hand plus a bespoke progress-bar list, looking nothing like the Sales/Remnawave stats. Rebuild it on the shared chart components and add the visualizations the data warrants: - Daily: MultiSeriesAreaChart (created/paid) + SimpleAreaChart (revenue), replacing the hand-rolled area chart and the custom progress-bar list. - Tariff & traffic sources: BreakdownList; payment methods & gift composition: DonutChart — all the same components Sales stats uses. - New conversion Funnel (created → paid) and a Gift activation card (claimed/sent + rate), backed by the new backend breakdowns. - Containers use the bento-card surface; i18n added in ru/en/zh/fa.
This commit is contained in:
@@ -326,10 +326,22 @@ export interface LandingTariffStat {
|
||||
revenue_kopeks: number;
|
||||
}
|
||||
|
||||
export interface LandingPaymentMethodStat {
|
||||
method: string;
|
||||
purchases: number;
|
||||
revenue_kopeks: number;
|
||||
}
|
||||
|
||||
export interface LandingSourceStat {
|
||||
source: string;
|
||||
purchases: number;
|
||||
}
|
||||
|
||||
export interface LandingStatsResponse {
|
||||
total_purchases: number;
|
||||
total_revenue_kopeks: number;
|
||||
total_gifts: number;
|
||||
total_gifts_claimed: number;
|
||||
total_regular: number;
|
||||
avg_purchase_kopeks: number;
|
||||
total_created: number;
|
||||
@@ -337,6 +349,8 @@ export interface LandingStatsResponse {
|
||||
conversion_rate: number;
|
||||
daily_stats: LandingDailyStat[];
|
||||
tariff_stats: LandingTariffStat[];
|
||||
payment_method_stats: LandingPaymentMethodStat[];
|
||||
source_stats: LandingSourceStat[];
|
||||
}
|
||||
|
||||
export type PurchaseItemStatus =
|
||||
|
||||
Reference in New Issue
Block a user