diff --git a/src/pages/AdminDashboard.tsx b/src/pages/AdminDashboard.tsx index dc7e340..97b0956 100644 --- a/src/pages/AdminDashboard.tsx +++ b/src/pages/AdminDashboard.tsx @@ -184,32 +184,32 @@ function RevenueChart({ data }: { data: { date: string; amount_rubles: number }[ ) } - const maxValue = Math.max(...data.map(d => d.amount_rubles), 1) const last7Days = data.slice(-7) + const maxValue = Math.max(...last7Days.map(d => d.amount_rubles), 1) return ( -
-
- {last7Days.map((item, index) => { - const height = (item.amount_rubles / maxValue) * 100 - const date = new Date(item.date) - const dayName = date.toLocaleDateString('ru-RU', { weekday: 'short' }) +
+ {last7Days.map((item, index) => { + const percentage = (item.amount_rubles / maxValue) * 100 + const date = new Date(item.date) + const dayName = date.toLocaleDateString('ru-RU', { weekday: 'short' }) + const dayNum = date.getDate() - return ( -
-
-
- {formatAmount(item.amount_rubles)} {currencySymbol} -
-
-
{dayName}
+ return ( +
+
+ {dayName}, {dayNum} + {formatAmount(item.amount_rubles)} {currencySymbol}
- ) - })} -
+
+
+
+
+ ) + })}
) }