k
This commit is contained in:
@@ -6,6 +6,7 @@ import {MRT_TableOptions} from "mantine-react-table";
|
|||||||
import {ActionIcon, Button, Flex, rem, Tooltip} from "@mantine/core";
|
import {ActionIcon, Button, Flex, rem, Tooltip} from "@mantine/core";
|
||||||
import {modals} from "@mantine/modals";
|
import {modals} from "@mantine/modals";
|
||||||
import {IconTrash} from "@tabler/icons-react";
|
import {IconTrash} from "@tabler/icons-react";
|
||||||
|
import {UserRoleEnum} from "../../../../shared/enums/UserRole.ts";
|
||||||
|
|
||||||
export type SimpleUsersTableProps = {
|
export type SimpleUsersTableProps = {
|
||||||
items: UserSchema[],
|
items: UserSchema[],
|
||||||
@@ -23,7 +24,7 @@ const SimpleUsersTable: FC<SimpleUsersTableProps> = ({items, onChange}) => {
|
|||||||
withCloseButton: false,
|
withCloseButton: false,
|
||||||
innerProps: {
|
innerProps: {
|
||||||
selectProps: {
|
selectProps: {
|
||||||
filterBy: (user) => !userIds.includes(user.id) //&& user.roleKey === UserRoleEnum.EMPLOYEE
|
filterBy: (user) => !userIds.includes(user.id) && user.roleKey === UserRoleEnum.EMPLOYEE
|
||||||
},
|
},
|
||||||
onSelect: (user) => onChange([...items, user])
|
onSelect: (user) => onChange([...items, user])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user