From 190cca7e6baff66920399812d04212a451f7106d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B1=D0=B8=D0=BB=D0=B8=D0=BD?= Date: Mon, 13 Jul 2026 17:35:51 +0300 Subject: [PATCH] =?UTF-8?q?fix(stats):=20top-=D1=81=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B8=20=D0=B3=D1=80=D1=83=D0=BF=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=82=D0=B8?= =?UTF-8?q?=D0=BF=D1=83=20=D0=BD=D0=B0=20list-=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=86=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs EventHub/EventHubFrontAdmin#27 Co-authored-by: Cursor --- src/pages/calendars/CalendarListPage.tsx | 29 ++++++++++++++++++++++ src/pages/events/EventListPage.tsx | 31 +++++++++++++++++++++++- src/pages/reports/ReportListPage.tsx | 29 ++++++++++++++++++++++ src/pages/reviews/ReviewListPage.tsx | 29 ++++++++++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) diff --git a/src/pages/calendars/CalendarListPage.tsx b/src/pages/calendars/CalendarListPage.tsx index b28e803..d076a4d 100644 --- a/src/pages/calendars/CalendarListPage.tsx +++ b/src/pages/calendars/CalendarListPage.tsx @@ -204,8 +204,37 @@ const CalendarListPage: React.FC = () => { ))} + {Object.entries(stats.calendars_by_type || {}).map(([type, count]) => ( + + + + + + ))} )} + {stats?.top_calendars_by_rating && stats.top_calendars_by_rating.length > 0 && ( + + ( + {title || record.id} + ), + }, + { title: 'Рейтинг', dataIndex: 'rating_avg', key: 'rating_avg' }, + { title: 'Отзывов', dataIndex: 'review_count', key: 'review_count' }, + ]} + /> + + )} { ))} + {Object.entries(stats.events_by_type || {}).map(([type, count]) => ( + + + + + + ))} )} + {stats?.top_events_by_rating && stats.top_events_by_rating.length > 0 && ( + +
( + {title || record.id} + ), + }, + { title: 'Рейтинг', dataIndex: 'rating_avg', key: 'rating_avg' }, + { title: 'Отзывов', dataIndex: 'review_count', key: 'review_count' }, + ]} + /> + + )}
{ ))} + {Object.entries(stats.reports_by_target_type || {}).map(([type, count]) => ( + + + + + + ))} )} + {stats?.top_targets_by_reports && stats.top_targets_by_reports.length > 0 && ( + +
`${r.target_type}-${r.target_id}`} + dataSource={stats.top_targets_by_reports} + columns={[ + { title: 'Тип', dataIndex: 'target_type', key: 'target_type' }, + { + title: 'ID цели', + dataIndex: 'target_id', + key: 'target_id', + render: (id: string, record) => ( + {id} + ), + }, + { title: 'Жалоб', dataIndex: 'report_count', key: 'report_count' }, + ]} + /> + + )}
{ ))} + {Object.entries(stats.reviews_by_target_type || {}).map(([type, count]) => ( + + + + + + ))} )} + {stats?.top_targets_by_reviews && stats.top_targets_by_reviews.length > 0 && ( + +
`${r.target_type}-${r.target_id}`} + dataSource={stats.top_targets_by_reviews} + columns={[ + { title: 'Тип', dataIndex: 'target_type', key: 'target_type' }, + { + title: 'ID цели', + dataIndex: 'target_id', + key: 'target_id', + render: (id: string, record) => ( + {id} + ), + }, + { title: 'Отзывов', dataIndex: 'review_count', key: 'review_count' }, + ]} + /> + + )}