revert(sales-stats): убрать карточки возвратов из сводки

Возвраты для оператора всегда 0 (реальные возвраты только Apple/Tribute,
которых нет) — постоянно пустые карточки только путают. Сводка вернулась
к 8 карточкам (grid 2/4). Убрал также неиспользуемый invertDelta из
StatCard и ключи refunds из локалей.
This commit is contained in:
c0mrade
2026-06-02 18:01:33 +03:00
parent 56d8e1ffa7
commit ec23618a56
7 changed files with 6 additions and 47 deletions

View File

@@ -26,9 +26,6 @@ interface StatCardProps {
valueClassName?: string;
/** Optional period-over-period change shown under the value. */
delta?: StatCardDelta | null;
/** For "lower is better" metrics (e.g. refunds): keep the real arrow but flip
* the colour, so a rise reads as bad (red) and a drop as good (green). */
invertDelta?: boolean;
}
export function StatCard({
@@ -38,18 +35,10 @@ export function StatCard({
tone = 'neutral',
valueClassName,
delta,
invertDelta = false,
}: StatCardProps) {
const toneStyle = TONE[tone];
const valueClass = valueClassName ?? toneStyle.value;
const baseTrend = delta ? (TREND_STYLES[delta.trend] ?? TREND_STYLES.stable) : null;
const trendStyle =
baseTrend && invertDelta && delta && delta.trend !== 'stable'
? {
arrow: baseTrend.arrow,
className: TREND_STYLES[delta.trend === 'up' ? 'down' : 'up'].className,
}
: baseTrend;
const trendStyle = delta ? (TREND_STYLES[delta.trend] ?? TREND_STYLES.stable) : null;
return (
<div className="rounded-xl bg-dark-800/30 p-3 transition-colors hover:bg-dark-800/50">