base page title
This commit is contained in:
+15
-630
@@ -27,7 +27,21 @@ import { useSharedStore } from './store/sharedStore'
|
||||
import { clx } from '../helpers/utils'
|
||||
import BlogSubMenu from './components/BlogSubMenu'
|
||||
import ShippingSubMenu from './components/ShippingSubMenu'
|
||||
import SubMenuItem from './components/SubMenuItem'
|
||||
import DashboardSubMenu from './components/DashboardSubMenu'
|
||||
import ProductsSubMenu from './components/ProductsSubMenu'
|
||||
import OrdersSubMenu from './components/OrdersSubMenu'
|
||||
import FinancialSubMenu from './components/FinancialSubMenu'
|
||||
import SellersSubMenu from './components/SellersSubMenu'
|
||||
import BuyersSubMenu from './components/BuyersSubMenu'
|
||||
import UsersSubMenu from './components/UsersSubMenu'
|
||||
import TicketsSubMenu from './components/TicketsSubMenu'
|
||||
import ReportsSubMenu from './components/ReportsSubMenu'
|
||||
import ChatSubMenu from './components/ChatSubMenu'
|
||||
import ContactSubMenu from './components/ContactSubMenu'
|
||||
import SettingsSubMenu from './components/SettingsSubMenu'
|
||||
import PagesSubMenu from './components/PagesSubMenu'
|
||||
import JobsSubMenu from './components/JobsSubMenu'
|
||||
import CategorySubMenu from './components/CategorySubMenu'
|
||||
import { Pages } from '../config/Pages'
|
||||
|
||||
|
||||
@@ -289,634 +303,5 @@ const SideBar: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
// کامپوننتهای SubMenu برای هر بخش - دقیقاً مثل BlogSubMenu
|
||||
const DashboardSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Home2
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
داشبورد
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'تعداد محصولات'}
|
||||
isActive={isActive('products-count')}
|
||||
link="/dashboard/products-count"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعداد سفارشات'}
|
||||
isActive={isActive('orders-count')}
|
||||
link="/dashboard/orders-count"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'کامنت های خوانده نشده'}
|
||||
isActive={isActive('unread-comments')}
|
||||
link="/dashboard/unread-comments"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعداد کاربران'}
|
||||
isActive={isActive('users-count')}
|
||||
link="/dashboard/users-count"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'نمودار سفارشات'}
|
||||
isActive={isActive('orders-chart')}
|
||||
link="/dashboard/orders-chart"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ProductsSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Element3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
محصولات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی ها'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.category.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'برند ها'}
|
||||
isActive={isActive('brands')}
|
||||
link={Pages.products.brands.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تنوع ها'}
|
||||
isActive={isActive('variants')}
|
||||
link="/products/variants"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'محصولات'}
|
||||
isActive={isActive('list')}
|
||||
link="/products/list"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'گارانتی ها'}
|
||||
isActive={isActive('warranty')}
|
||||
link={Pages.products.warranty.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const OrdersSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return window.location.href.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Receipt21
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
سفارشات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست سفارشات (فروشندگان)'}
|
||||
isActive={isActive('/seller')}
|
||||
link={Pages.orders.sellers}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'لیست سفارشات (مدیر)'}
|
||||
isActive={isActive('/native')}
|
||||
link={Pages.orders.admin}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سفارشات کنسل شده'}
|
||||
isActive={isActive('Cancelled')}
|
||||
link={Pages.orders.cancelled}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سفارشات تکمیل شده'}
|
||||
isActive={isActive('Completed')}
|
||||
link={Pages.orders.completed}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی کنسلی ها'}
|
||||
isActive={isActive('cancellation-categories')}
|
||||
link={Pages.orders.cancellationCategories}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی مرجوعی ها'}
|
||||
isActive={isActive('return-categories')}
|
||||
link={Pages.orders.returnCategories}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
const FinancialSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Money3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
مالی
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'تراکنش ها'}
|
||||
isActive={isActive('transactions')}
|
||||
link={Pages.financial.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'جریمه ها'}
|
||||
isActive={isActive('fine')}
|
||||
link={Pages.financial.fines}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const SellersSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<People
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
فروشندگان
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست فروشندگان'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.sellers.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'کیف پول فروشندگان'}
|
||||
isActive={isActive('wallet')}
|
||||
link={Pages.sellers.withdrawalRequests}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'درخواست ها عمده فروشی'}
|
||||
isActive={isActive('wholesale-requests')}
|
||||
link={Pages.sellers.wholesaleRequests}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'ارسال اطلاعیه'}
|
||||
isActive={isActive('announcement')}
|
||||
link={Pages.sellers.announcement}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'درخواست های ثبت محصول'}
|
||||
isActive={isActive('request-create-product')}
|
||||
link={Pages.sellers.requestCreateProduct}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'قرار داد'}
|
||||
isActive={isActive('contract')}
|
||||
link={Pages.sellers.contract}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'آموزش ها'}
|
||||
isActive={isActive('learning')}
|
||||
link={Pages.sellers.learning}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی آموزش ها'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.sellers.learningCategory}
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const BuyersSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<UserSquare
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
خریداران
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست خریداران'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.buyUsers.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const UsersSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b pb-10 px-6'>
|
||||
<Profile
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
ادمین ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست ادمین ها'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.admin.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعریف نقش'}
|
||||
isActive={isActive('roles')}
|
||||
link={Pages.admin.roleList}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعریف گروه کاربری'}
|
||||
isActive={isActive('groups')}
|
||||
link={Pages.admin.groupList}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const TicketsSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Messages3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
تیکت ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست تیکت ها'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.ticket.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی تیکت ها'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.ticket.category.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ReportsSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Chart
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
گزارش ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'گزارش فروش'}
|
||||
isActive={isActive('sales')}
|
||||
link="/reports/sales"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'گزارش محصولات'}
|
||||
isActive={isActive('products')}
|
||||
link="/reports/products"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی گزارشات'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.report.category}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ChatSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<SmsTracking
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
گفت و گو
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'چت بین کاربران'}
|
||||
isActive={isActive('users')}
|
||||
link="/chat/users"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'چت با مدیر سایت'}
|
||||
isActive={isActive('admin')}
|
||||
link="/chat/admin"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ContactSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Headphone
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
ارتباط با ما
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'پیام های دریافتی'}
|
||||
isActive={isActive('contact')}
|
||||
link={Pages.contactUs.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const SettingsSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Setting2
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
تنظیمات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'تنظیمات فروشگاه'}
|
||||
isActive={isActive('shop')}
|
||||
link={Pages.setting.shop}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تنظیمات فوتر'}
|
||||
isActive={isActive('site-setting')}
|
||||
link={Pages.setting.siteSetting}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تنظیمات بنرها'}
|
||||
isActive={isActive('banners')}
|
||||
link="/settings/banners"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const PagesSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<DocumentText
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
مدیریت صفحات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'درباره ما'}
|
||||
isActive={isActive('about-us')}
|
||||
link={Pages.pages.aboutUs}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سوالات متداول'}
|
||||
isActive={isActive('faq')}
|
||||
link={Pages.pages.faq}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'صفحه روش های ارسال'}
|
||||
isActive={isActive('shipment')}
|
||||
link={Pages.pages.shipment}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'حریم خصوصی'}
|
||||
isActive={isActive('privacy')}
|
||||
link={Pages.pages.privacy}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'قوانین مرجوعی'}
|
||||
isActive={isActive('return-policy')}
|
||||
link={Pages.pages.returnPolicy}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'مشاغل'}
|
||||
isActive={isActive('jobs')}
|
||||
link={Pages.pages.jobs}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'اسناد'}
|
||||
isActive={isActive('documents')}
|
||||
link={Pages.pages.documents}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعرفه درآمد'}
|
||||
isActive={isActive('income-tariff')}
|
||||
link={Pages.pages.incomeTariff}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const JobsSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Briefcase
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
مشاغل
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست مشاغل'}
|
||||
isActive={isActive('list')}
|
||||
link="/jobs/list"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'لیست رزومه ها'}
|
||||
isActive={isActive('resumes')}
|
||||
link="/jobs/resumes"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const CategorySubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Element3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
دسته بندی ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست دسته ها'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.category.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'افزودن دسته جدید'}
|
||||
isActive={isActive('create')}
|
||||
link={Pages.category.create}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SideBar
|
||||
@@ -0,0 +1,37 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { UserSquare } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const BuyersSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<UserSquare
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
خریداران
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست خریداران'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.buyUsers.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default BuyersSubMenu
|
||||
@@ -0,0 +1,42 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Element3 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const CategorySubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Element3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
دسته بندی ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست دسته ها'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.category.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'افزودن دسته جدید'}
|
||||
isActive={isActive('create')}
|
||||
link={Pages.category.create}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default CategorySubMenu
|
||||
@@ -0,0 +1,41 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { SmsTracking } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
|
||||
const ChatSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<SmsTracking
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
گفت و گو
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'چت بین کاربران'}
|
||||
isActive={isActive('users')}
|
||||
link="/chat/users"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'چت با مدیر سایت'}
|
||||
isActive={isActive('admin')}
|
||||
link="/chat/admin"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ChatSubMenu
|
||||
@@ -0,0 +1,37 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Headphone } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const ContactSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Headphone
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
ارتباط با ما
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'پیام های دریافتی'}
|
||||
isActive={isActive('contact')}
|
||||
link={Pages.contactUs.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ContactSubMenu
|
||||
@@ -0,0 +1,56 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Home2 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
|
||||
const DashboardSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Home2
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
داشبورد
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'تعداد محصولات'}
|
||||
isActive={isActive('product-stats')}
|
||||
link="/dashboard/product-stats"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعداد سفارشات'}
|
||||
isActive={isActive('order-stats')}
|
||||
link="/dashboard/order-stats"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'کامنت های خوانده نشده'}
|
||||
isActive={isActive('unread-comments')}
|
||||
link="/dashboard/unread-comments"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعداد کاربران'}
|
||||
isActive={isActive('user-stats')}
|
||||
link="/dashboard/user-stats"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'نمودار سفارشات'}
|
||||
isActive={isActive('order-chart')}
|
||||
link="/dashboard/order-chart"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DashboardSubMenu
|
||||
@@ -0,0 +1,42 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Money3 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const FinancialSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Money3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
مالی
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'تراکنش ها'}
|
||||
isActive={isActive('transactions')}
|
||||
link={Pages.financial.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'جریمه ها'}
|
||||
isActive={isActive('fine')}
|
||||
link={Pages.financial.fines}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default FinancialSubMenu
|
||||
@@ -0,0 +1,41 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Briefcase } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
|
||||
const JobsSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Briefcase
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
مشاغل
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست مشاغل'}
|
||||
isActive={isActive('list')}
|
||||
link="/jobs/list"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'لیست رزومه ها'}
|
||||
isActive={isActive('resumes')}
|
||||
link="/jobs/resumes"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default JobsSubMenu
|
||||
@@ -0,0 +1,60 @@
|
||||
import { type FC } from 'react'
|
||||
import { Receipt21 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const OrdersSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return window.location.href.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Receipt21
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
سفارشات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست سفارشات (فروشندگان)'}
|
||||
isActive={isActive('/seller')}
|
||||
link={Pages.orders.sellers}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'لیست سفارشات (مدیر)'}
|
||||
isActive={isActive('/native')}
|
||||
link={Pages.orders.admin}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سفارشات کنسل شده'}
|
||||
isActive={isActive('Cancelled')}
|
||||
link={Pages.orders.cancelled}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سفارشات تکمیل شده'}
|
||||
isActive={isActive('Completed')}
|
||||
link={Pages.orders.completed}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی کنسلی ها'}
|
||||
isActive={isActive('cancellation-categories')}
|
||||
link={Pages.orders.cancellationCategories}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی مرجوعی ها'}
|
||||
isActive={isActive('return-categories')}
|
||||
link={Pages.orders.returnCategories}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default OrdersSubMenu
|
||||
@@ -0,0 +1,72 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { DocumentText } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const PagesSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<DocumentText
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
مدیریت صفحات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'درباره ما'}
|
||||
isActive={isActive('about-us')}
|
||||
link={Pages.pages.aboutUs}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سوالات متداول'}
|
||||
isActive={isActive('faq')}
|
||||
link={Pages.pages.faq}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'صفحه روش های ارسال'}
|
||||
isActive={isActive('shipment')}
|
||||
link={Pages.pages.shipment}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'حریم خصوصی'}
|
||||
isActive={isActive('privacy')}
|
||||
link={Pages.pages.privacy}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'قوانین مرجوعی'}
|
||||
isActive={isActive('return-policy')}
|
||||
link={Pages.pages.returnPolicy}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'مشاغل'}
|
||||
isActive={isActive('jobs')}
|
||||
link={Pages.pages.jobs}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'اسناد'}
|
||||
isActive={isActive('documents')}
|
||||
link={Pages.pages.documents}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعرفه درآمد'}
|
||||
isActive={isActive('income-tariff')}
|
||||
link={Pages.pages.incomeTariff}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PagesSubMenu
|
||||
@@ -0,0 +1,52 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Element3 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const ProductsSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Element3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
محصولات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی ها'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.category.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'برند ها'}
|
||||
isActive={isActive('brands')}
|
||||
link={Pages.products.brands.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'محصولات'}
|
||||
isActive={isActive('list')}
|
||||
link="/products/list"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'گارانتی ها'}
|
||||
isActive={isActive('warranty')}
|
||||
link={Pages.products.warranty.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProductsSubMenu
|
||||
@@ -0,0 +1,47 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Chart } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const ReportsSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Chart
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
گزارش ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'گزارش فروش'}
|
||||
isActive={isActive('sales')}
|
||||
link="/reports/sales"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'گزارش محصولات'}
|
||||
isActive={isActive('products')}
|
||||
link="/reports/products"
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی گزارشات'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.report.category}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ReportsSubMenu
|
||||
@@ -0,0 +1,72 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { People } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const SellersSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<People
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
فروشندگان
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست فروشندگان'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.sellers.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'کیف پول فروشندگان'}
|
||||
isActive={isActive('wallet')}
|
||||
link={Pages.sellers.withdrawalRequests}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'درخواست ها عمده فروشی'}
|
||||
isActive={isActive('wholesale-requests')}
|
||||
link={Pages.sellers.wholesaleRequests}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'ارسال اطلاعیه'}
|
||||
isActive={isActive('announcement')}
|
||||
link={Pages.sellers.announcement}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'درخواست های ثبت محصول'}
|
||||
isActive={isActive('request-create-product')}
|
||||
link={Pages.sellers.requestCreateProduct}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'قرار داد'}
|
||||
isActive={isActive('contract')}
|
||||
link={Pages.sellers.contract}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'آموزش ها'}
|
||||
isActive={isActive('learning')}
|
||||
link={Pages.sellers.learning}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی آموزش ها'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.sellers.learningCategory}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SellersSubMenu
|
||||
@@ -0,0 +1,47 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Setting2 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const SettingsSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Setting2
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
تنظیمات
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'تنظیمات فروشگاه'}
|
||||
isActive={isActive('shop')}
|
||||
link={Pages.setting.shop}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تنظیمات فوتر'}
|
||||
isActive={isActive('site-setting')}
|
||||
link={Pages.setting.siteSetting}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تنظیمات بنرها'}
|
||||
isActive={isActive('banners')}
|
||||
link="/settings/banners"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SettingsSubMenu
|
||||
@@ -0,0 +1,42 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Messages3 } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const TicketsSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
|
||||
<Messages3
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
تیکت ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست تیکت ها'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.ticket.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی تیکت ها'}
|
||||
isActive={isActive('category')}
|
||||
link={Pages.ticket.category.list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default TicketsSubMenu
|
||||
@@ -0,0 +1,47 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Profile } from 'iconsax-react'
|
||||
import SubMenuItem from './SubMenuItem'
|
||||
import { Pages } from '../../config/Pages'
|
||||
|
||||
const UsersSubMenu: FC = () => {
|
||||
const location = useLocation()
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='py-12'>
|
||||
<div className='flex gap-3 items-center border-b pb-10 px-6'>
|
||||
<Profile
|
||||
size={24}
|
||||
color='#000'
|
||||
variant='Bold'
|
||||
/>
|
||||
<div className='text-xs'>
|
||||
ادمین ها
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست ادمین ها'}
|
||||
isActive={isActive('list')}
|
||||
link={Pages.admin.list}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعریف نقش'}
|
||||
isActive={isActive('roles')}
|
||||
link={Pages.admin.roleList}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'تعریف گروه کاربری'}
|
||||
isActive={isActive('groups')}
|
||||
link={Pages.admin.groupList}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default UsersSubMenu
|
||||
Reference in New Issue
Block a user