+
+ {canSort ? (
+
+ ) : (
+
+ {icon && icon}
+ {resolvedTitle}
+
+ )}
- {icon && icon}
- {resolvedTitle}
- {sortIcon}
+
}
/>
@@ -308,7 +326,7 @@ function DataGridColumnHeaderInner({
{menuItems}
- {props.tableLayout?.columnsPinnable && canPin && isPinned && (
+ {props.tableLayout?.columnsPinnable && canPin && isPinned ? (
- )}
+ ) : null}
)
}
diff --git a/apps/web/src/components/users/users-columns.tsx b/apps/web/src/components/users/users-columns.tsx
index 5637854..b748c4d 100644
--- a/apps/web/src/components/users/users-columns.tsx
+++ b/apps/web/src/components/users/users-columns.tsx
@@ -349,7 +349,7 @@ export function createUsersColumns(opts: {
},
{
id: 'current_connections',
- accessorKey: 'current_connections',
+ accessorFn: (row) => Number(row.current_connections ?? 0),
header: ({ column }) => (
@@ -442,7 +443,12 @@ export function createUsersColumns(opts: {
},
{
id: 'data_quota_bytes',
- accessorKey: 'data_quota_bytes',
+ accessorFn: (row) => {
+ const quota = row.data_quota_bytes
+ if (typeof quota === 'number' && quota > 0) return quota
+ // «Без квоты» в UI показывает usage — сортируем по тому же смыслу
+ return Number(row.total_octets ?? 0)
+ },
header: ({ column }) => (
),
@@ -451,6 +457,7 @@ export function createUsersColumns(opts: {
enableSorting: true,
enableHiding: true,
enableResizing: true,
+ sortingFn: 'basic',
meta: {
skeleton: (
@@ -534,9 +541,12 @@ export function createUsersColumns(opts: {
enableSorting: false,
enableHiding: false,
enableResizing: false,
+ enablePinning: false,
size: 52,
meta: {
skeleton: ,
+ cellClassName: 'bg-transparent!',
+ headerClassName: 'bg-transparent!',
},
},
]
diff --git a/apps/web/src/components/users/users-grid-view.tsx b/apps/web/src/components/users/users-grid-view.tsx
index 2bbd5dc..a5656fc 100644
--- a/apps/web/src/components/users/users-grid-view.tsx
+++ b/apps/web/src/components/users/users-grid-view.tsx
@@ -276,9 +276,17 @@ export function UsersGridView() {
enableColumnVisibility
columnVisibility={columnVisibility}
onColumnVisibilityChange={setColumnVisibility}
- pinLastColumn
pageSize={5}
initialSorting={[{ id: 'username', desc: false }]}
+ tableLayout={{
+ dense: true,
+ columnsResizable: true,
+ columnsMovable: true,
+ columnsVisibility: true,
+ columnsPinnable: false,
+ rowsPinnable: true,
+ }}
+ pinLastColumn={false}
emptyState={{
title: 'Нет пользователей',
description: 'Создайте первый аккаунт Telemt.',