From d2058f07dd3e8bd59cf63f0605e0568cd6576957 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 1 Jun 2026 08:15:44 +0200 Subject: [PATCH] fix(inbounds): correct per-inbound client counts and align stat colors The client column under-counted clients attached to an inbound whose shared client_traffics row is keyed to a different inbound: rollupClients filtered settings.clients down to emails that had a stat row on that inbound. Count from settings.clients membership instead. Also surface all/active/disable/depleted/online with the Clients-page color scheme and widen the column. --- .../pages/inbounds/list/useInboundColumns.tsx | 31 ++++++++++--------- frontend/src/pages/inbounds/useInbounds.ts | 9 +----- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/frontend/src/pages/inbounds/list/useInboundColumns.tsx b/frontend/src/pages/inbounds/list/useInboundColumns.tsx index 7cffdca0..0dc7479a 100644 --- a/frontend/src/pages/inbounds/list/useInboundColumns.tsx +++ b/frontend/src/pages/inbounds/list/useInboundColumns.tsx @@ -1,6 +1,7 @@ import { useMemo, type ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; import { Popover, Switch, Tag, type TableColumnType } from 'antd'; +import { TeamOutlined } from '@ant-design/icons'; import { SizeFormatter, IntlUtil, ColorUtils } from '@/utils'; import { InfinityIcon } from '@/components/ui'; @@ -152,15 +153,27 @@ export function useInboundColumns({ title: t('clients'), key: 'clients', align: 'left', - width: 50, + width: 80, render: (_, record) => { const cc = clientCount[record.id]; if (!cc) return null; return ( <> - - {cc.clients} + + {cc.clients} + {cc.active.length > 0 && ( + + {cc.active.map((e) =>
{e}
)} + + )} + > + {cc.active.length} +
+ )} {cc.deactive.length > 0 && ( {cc.depleted.length}
)} - {cc.expiring.length > 0 && ( - - {cc.expiring.map((e) =>
{e}
)} - - )} - > - {cc.expiring.length} -
- )} {cc.online.length > 0 && ( (); - for (const s of clientStats) { - if (s && s.email) statsEmails.add(s.email); - } - const clients = clientStats.length > 0 - ? allClients.filter((c) => c && c.email && statsEmails.has(c.email)) - : allClients; + const clients = inbound?.clients || []; const active: string[] = []; const deactive: string[] = []; const depleted: string[] = [];