fix(ui): показывать подтверждённые каталоги пользователей

This commit is contained in:
Denozordec committed 2026-10-01 09:34:51 +07:00
1 parent 0a332ce341
commit 2d5fb3598f
10 files changed
+186 -53

No files matched your search

+10 -2
View File
@@ -44,9 +44,10 @@ function AvatarCircle({ avatar, active }: { avatar: string; active: boolean }) {
interface UsersDataGridProps {
users: AppUser[]
serversCount: number
serversCount: number | null
allSectionsCount?: number
isLoading?: boolean
actionsDisabled?: boolean
onEdit: (user: AppUser) => void
onDelete: (user: AppUser) => void
}
@@ -56,6 +57,7 @@ function UsersDataGrid({
serversCount,
allSectionsCount = ALL_SECTIONS.length,
isLoading,
actionsDisabled,
onEdit,
onDelete,
}: UsersDataGridProps) {
@@ -182,6 +184,9 @@ function UsersDataGrid({
variant="ghost"
className="size-7 p-0 text-muted-foreground hover:text-foreground"
onClick={() => onEdit(u)}
type="button"
disabled={actionsDisabled}
aria-label={"Редактировать пользователя " + u.name}
title="Редактировать"
>
<PencilIcon className="size-3.5" />
@@ -191,6 +196,9 @@ function UsersDataGrid({
variant="ghost"
className="size-7 p-0 text-muted-foreground hover:text-destructive"
onClick={() => onDelete(u)}
type="button"
disabled={actionsDisabled}
aria-label={"Удалить пользователя " + u.name}
title="Удалить"
>
<TrashIcon className="size-3.5" />
@@ -205,7 +213,7 @@ function UsersDataGrid({
},
},
],
[allSectionsCount, onDelete, onEdit, serversCount],
[allSectionsCount, actionsDisabled, onDelete, onEdit, serversCount],
)
const table = useTable({