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' }, + ]} + /> + + )}