From f4a888ad260843426ca6ccbbaab8de0549f0e2a8 Mon Sep 17 00:00:00 2001 From: Davor Date: Wed, 13 Jul 2022 11:40:12 +0200 Subject: [PATCH 1/5] wip for create batch users modal --- src/modules/users/Users.tsx | 19 ++- .../MultipleUsersModal/MultipleUsersModal.tsx | 124 ++++++++++++++++++ .../components/MultipleUsersModal/index.ts | 1 + .../components/MultipleUsersModal/types.ts | 5 + .../components/MultipleUsersModal/utils.ts | 14 ++ src/modules/users/components/index.ts | 1 + 6 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 src/modules/users/components/MultipleUsersModal/MultipleUsersModal.tsx create mode 100644 src/modules/users/components/MultipleUsersModal/index.ts create mode 100644 src/modules/users/components/MultipleUsersModal/types.ts create mode 100644 src/modules/users/components/MultipleUsersModal/utils.ts create mode 100644 src/modules/users/components/index.ts diff --git a/src/modules/users/Users.tsx b/src/modules/users/Users.tsx index c40cc79..814c4c9 100644 --- a/src/modules/users/Users.tsx +++ b/src/modules/users/Users.tsx @@ -4,14 +4,16 @@ import { SearchIcon, PlusIcon } from '@heroicons/react/solid'; import { CogIcon, TrashIcon } from '@heroicons/react/outline'; import { useUsers } from 'src/services/users'; import { Table } from 'src/components'; -import { debounce } from 'lodash'; +import _, { debounce } from 'lodash'; import { useAuth } from 'src/services/auth'; import { UserModal } from '../../components/UserModal'; +import { MultipleUsersModal } from './components'; export const Users: React.FC = () => { const [selectedRowsIds, setSelectedRowsIds] = useState({}); const [configureModal, setConfigureModal] = useState(false); + const [multipleUsersModal, setMultipleUsersModal] = useState(false); const [userId, setUserId] = useState(null); const [search, setSearch] = useState(''); const { users, loadUsers, userTableLoading } = useUsers(); @@ -106,6 +108,14 @@ export const Users: React.FC = () => {