fix(subscriptions): subscriptions_by_plan и ending_paid_subscriptions
Refs EventHub/EventHubFrontAdmin#28 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -198,8 +198,31 @@ const SubscriptionListPage: React.FC = () => {
|
||||
</Card>
|
||||
</Col>
|
||||
))}
|
||||
{Object.entries(stats.subscriptions_by_plan || {}).map(([plan, count]) => (
|
||||
<Col xs={12} sm={6} md={4} key={`plan-${plan}`}>
|
||||
<Card>
|
||||
<Statistic title={`План: ${plan}`} value={count} />
|
||||
</Card>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
)}
|
||||
{stats?.ending_paid_subscriptions && stats.ending_paid_subscriptions.length > 0 && (
|
||||
<Card title="Заканчивающиеся платные подписки" style={{ marginBottom: 16 }}>
|
||||
<Table
|
||||
size="small"
|
||||
pagination={false}
|
||||
rowKey="id"
|
||||
dataSource={stats.ending_paid_subscriptions}
|
||||
columns={[
|
||||
{ title: 'ID', dataIndex: 'id', key: 'id' },
|
||||
{ title: 'Пользователь', dataIndex: 'user_id', key: 'user_id' },
|
||||
{ title: 'План', dataIndex: 'plan', key: 'plan' },
|
||||
{ title: 'Истекает', dataIndex: 'expires_at', key: 'expires_at' },
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
)}
|
||||
<Space style={{ marginBottom: 16 }}>
|
||||
<Select
|
||||
allowClear
|
||||
|
||||
Reference in New Issue
Block a user