diff --git a/src/config/Pages.ts b/src/config/Pages.ts
index a3fb20d..80fd7c5 100644
--- a/src/config/Pages.ts
+++ b/src/config/Pages.ts
@@ -56,6 +56,9 @@ export const Pages = {
},
users: {
list: "/users/list",
+ create: "/users/create",
+ roleList: "/users/roles-all",
+ roleCreate: "/users/roles-add",
},
ads: {
list: "/ads/list",
diff --git a/src/langs/fa.json b/src/langs/fa.json
index f8949c3..cd88efa 100644
--- a/src/langs/fa.json
+++ b/src/langs/fa.json
@@ -77,7 +77,11 @@
"create_customer": "افزودن مشتری",
"ticket_list": "لیست تیکت ها",
"send_ticket": "ارسال تیکت",
- "category": "دسته بندی"
+ "category": "دسته بندی",
+ "user_list": "لیست کاربران",
+ "add_user": "افزودن کاربر",
+ "role_list": "لیست نقش ها",
+ "role_create": "افزودن نقش"
},
"header": {
"search": "جستجو"
@@ -458,6 +462,29 @@
"notif": {
"natification": "اعلان ها"
},
+ "user": {
+ "users_list": "لیست کاربران",
+ "add_user": "افزودن کاربر",
+ "name": "نام",
+ "title_job": "عنوان شغلی",
+ "email": "ایمیل",
+ "role": "نقش",
+ "submit_user": "ثبت کاربر",
+ "info_user": "اطلاعات کاربر",
+ "family": "نام خانوادگی",
+ "phone_number": "شماره تماس",
+ "password": "رمز عبور",
+ "reapeat_password": "تکرار رمز عبور",
+ "image": "تصویر حساب کاربری",
+ "roles_list": "لیست نقش ها",
+ "add_role": "افزودن نقش",
+ "role_search": "جستجو در نقش ها",
+ "title": "عنوان",
+ "user": "کاربر",
+ "submit_role": "ثبت نقش",
+ "title_role": "عنوان نقش",
+ "permissions": "دسترسی ها"
+ },
"profile": {
"account_user": "حساب کاربری",
"image_profile": "تصویر حساب کاربری",
diff --git a/src/pages/users/Create.tsx b/src/pages/users/Create.tsx
new file mode 100644
index 0000000..8b4f95f
--- /dev/null
+++ b/src/pages/users/Create.tsx
@@ -0,0 +1,102 @@
+import { FC } from 'react'
+import { useTranslation } from 'react-i18next'
+import Button from '../../components/Button'
+import { TickCircle } from 'iconsax-react'
+import Input from '../../components/Input'
+import Select from '../../components/Select'
+import UploadBoxDraggble from '../../components/UploadBoxDraggble'
+
+const CreateUser: FC = () => {
+
+ const { t } = useTranslation('global')
+
+ return (
+
+
+
+ {t('service.cateory_services')}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {t('user.image')}
+
+
+ null}
+ />
+
+
+
+
+
+
+ )
+}
+
+export default CreateUser
\ No newline at end of file
diff --git a/src/pages/users/List.tsx b/src/pages/users/List.tsx
new file mode 100644
index 0000000..4f02cd0
--- /dev/null
+++ b/src/pages/users/List.tsx
@@ -0,0 +1,101 @@
+import { FC } from 'react'
+import { useTranslation } from 'react-i18next'
+import Button from '../../components/Button'
+import { Add, Eye } from 'iconsax-react'
+import Select from '../../components/Select'
+import Input from '../../components/Input'
+import Td from '../../components/Td'
+import { Link } from 'react-router-dom'
+import { Pages } from '../../config/Pages'
+
+const UsersList: FC = () => {
+
+ const { t } = useTranslation('global')
+
+ return (
+
+
+
+ {t('user.users_list')}
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+
+
+
+
+
+ )
+}
+
+export default UsersList
\ No newline at end of file
diff --git a/src/pages/users/RoleCreate.tsx b/src/pages/users/RoleCreate.tsx
new file mode 100644
index 0000000..bdfb34c
--- /dev/null
+++ b/src/pages/users/RoleCreate.tsx
@@ -0,0 +1,59 @@
+import { FC } from 'react'
+import { useTranslation } from 'react-i18next'
+import Button from '../../components/Button'
+import { TickCircle } from 'iconsax-react'
+import Input from '../../components/Input'
+
+const RoleCreate: FC = () => {
+
+ const { t } = useTranslation('global')
+
+ return (
+
+
+
+ {t('user.add_role')}
+
+
+
+
+
+
+
+
+
+
+
+ {t('user.permissions')}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default RoleCreate
\ No newline at end of file
diff --git a/src/pages/users/RolesList.tsx b/src/pages/users/RolesList.tsx
new file mode 100644
index 0000000..e977937
--- /dev/null
+++ b/src/pages/users/RolesList.tsx
@@ -0,0 +1,81 @@
+import { FC } from 'react'
+import { useTranslation } from 'react-i18next'
+import Button from '../../components/Button'
+import { Add, Eye } from 'iconsax-react'
+import Input from '../../components/Input'
+import Td from '../../components/Td'
+import { Link } from 'react-router-dom'
+import { Pages } from '../../config/Pages'
+
+const RolesList: FC = () => {
+
+ const { t } = useTranslation('global')
+
+ return (
+
+
+
+ {t('user.roles_list')}
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+
+
+
+
+ |
+
+
+ |
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+ )
+}
+
+export default RolesList
\ No newline at end of file
diff --git a/src/router/Main.tsx b/src/router/Main.tsx
index d11b2d1..df891ae 100644
--- a/src/router/Main.tsx
+++ b/src/router/Main.tsx
@@ -40,6 +40,10 @@ import MessagesList from '../pages/messages/List'
import CriticismsList from '../pages/criticisms/List'
import CriticismsDetail from '../pages/criticisms/Detail'
import Create from '../pages/annoncement/Create'
+import UsersList from '../pages/users/List'
+import CreateUser from '../pages/users/Create'
+import RolesList from '../pages/users/RolesList'
+import RoleCreate from '../pages/users/RoleCreate'
const MainRouter: FC = () => {
@@ -92,6 +96,10 @@ const MainRouter: FC = () => {
} />
} />
} />
+ } />
+ } />
+ } />
+ } />
diff --git a/src/shared/SideBar.tsx b/src/shared/SideBar.tsx
index f88510a..ee8859d 100644
--- a/src/shared/SideBar.tsx
+++ b/src/shared/SideBar.tsx
@@ -14,6 +14,7 @@ import TransactionsSubMenu from './components/TransactionsSubMenu'
import ReceiptSubMenu from './components/ReceiptSubMenu'
import CustomerSubMenu from './components/CustomerSubMenu'
import TicketSubMenu from './components/TicketSubMenu'
+import UsersSubMenu from './components/UsersSubMenu'
const SideBar: FC = () => {
@@ -260,7 +261,9 @@ const SideBar: FC = () => {
: subMenuName === 'tickets' ?
- : null
+ : subMenuName === 'users' ?
+
+ : null
}
}
diff --git a/src/shared/components/UsersSubMenu.tsx b/src/shared/components/UsersSubMenu.tsx
new file mode 100644
index 0000000..33395f2
--- /dev/null
+++ b/src/shared/components/UsersSubMenu.tsx
@@ -0,0 +1,54 @@
+import { Profile } from 'iconsax-react'
+import { FC } from 'react'
+import { useTranslation } from 'react-i18next'
+import SubMenuItem from './SubMenuItem'
+import { Pages } from '../../config/Pages'
+
+const UsersSubMenu: FC = () => {
+
+ const { t } = useTranslation('global')
+
+ const isActive = (name: string) => {
+ return location.pathname.includes(name)
+ }
+
+ return (
+
+
+
+
+ {t('sidebar.users')}
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default UsersSubMenu
\ No newline at end of file