base page title
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import TitleLine from './TitleLine'
|
||||
import { getPageTitle } from '../config/PageTitles'
|
||||
|
||||
const PageTitle: FC = () => {
|
||||
const location = useLocation()
|
||||
const title = getPageTitle(location.pathname)
|
||||
|
||||
return <TitleLine title={title} />
|
||||
}
|
||||
|
||||
export default PageTitle
|
||||
@@ -6,7 +6,7 @@ type Props = {
|
||||
|
||||
const TitleLine: FC<Props> = (props: Props) => {
|
||||
return (
|
||||
<div className='w-full text-sm flex items-center gap-4'>
|
||||
<div className='w-full text-sm flex items-center gap-4 my-7'>
|
||||
<div className='whitespace-nowrap'>{props.title}</div>
|
||||
<svg style={{ width: '100%', height: 1 }} xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
|
||||
<line x1="0" y1="0" x2="100%" y2="0" stroke="#aaa" strokeWidth="1" strokeDasharray="5 3" />
|
||||
|
||||
@@ -0,0 +1,354 @@
|
||||
import { Pages } from "./Pages";
|
||||
|
||||
export const PageTitles = {
|
||||
// Dashboard
|
||||
[Pages.dashboard]: "نمای کلی داشبورد",
|
||||
|
||||
// Products
|
||||
[Pages.products.list]: "لیست محصولات",
|
||||
[Pages.products.create]: "افزودن محصول جدید",
|
||||
[Pages.products.update]: "ویرایش محصول",
|
||||
[Pages.products.variants]: "مدیریت تنوع محصول",
|
||||
[Pages.products.brands.list]: "لیست برندها",
|
||||
[Pages.products.brands.create]: "افزودن برند جدید",
|
||||
[Pages.products.brands.update]: "ویرایش برند",
|
||||
[Pages.products.warranty.list]: "لیست گارانتیها",
|
||||
[Pages.products.warranty.create]: "افزودن گارانتی جدید",
|
||||
[Pages.products.warranty.update]: "ویرایش گارانتی",
|
||||
|
||||
// Categories
|
||||
[Pages.category.list]: "لیست دستهبندیها",
|
||||
[Pages.category.create]: "افزودن دستهبندی جدید",
|
||||
[Pages.category.update]: "ویرایش دستهبندی",
|
||||
[Pages.category.variant]: "مدیریت تنوع دستهبندی",
|
||||
[Pages.category.attributes]: "ویژگیهای دستهبندی",
|
||||
|
||||
// Orders
|
||||
[Pages.orders.native]: "سفارشات",
|
||||
[Pages.orders.sellers]: "سفارشات فروشندگان",
|
||||
[Pages.orders.completed]: "سفارشات تکمیل شده",
|
||||
[Pages.orders.cancelled]: "سفارشات لغو شده",
|
||||
[Pages.orders.pending]: "سفارشات در انتظار",
|
||||
[Pages.orders.detail]: "جزئیات سفارش",
|
||||
[Pages.orders.cancellationCategories]: "دستهبندیهای لغو سفارش",
|
||||
[Pages.orders.returnCategories]: "دستهبندیهای بازگشت سفارش",
|
||||
|
||||
// Sellers
|
||||
[Pages.sellers.list]: "لیست فروشندگان",
|
||||
[Pages.sellers.wholesaleRequests]: "درخواستهای عمدهفروشی",
|
||||
[Pages.sellers.withdrawalRequests]: "درخواستهای برداشت وجه",
|
||||
[Pages.sellers.announcement]: "اعلانات فروشندگان",
|
||||
[Pages.sellers.requestCreateProduct]: "درخواست ایجاد محصول",
|
||||
[Pages.sellers.learningCategory]: "دستهبندیهای آموزشی",
|
||||
[Pages.sellers.learning]: "آموزشها",
|
||||
[Pages.sellers.learningCreate]: "افزودن آموزش جدید",
|
||||
[Pages.sellers.learningUpdate]: "ویرایش آموزش",
|
||||
[Pages.sellers.contract]: "قرارداد فروشندگان",
|
||||
|
||||
// Financial
|
||||
[Pages.financial.list]: "تراکنشهای مالی",
|
||||
[Pages.financial.fines]: "جریمهها",
|
||||
[Pages.financial.createFine]: "ایجاد جریمه جدید",
|
||||
|
||||
// Reports
|
||||
[Pages.report.product]: "گزارش محصولات",
|
||||
[Pages.report.category]: "گزارش دستهبندیها",
|
||||
|
||||
// Admin
|
||||
[Pages.admin.list]: "لیست ادمینها",
|
||||
[Pages.admin.create]: "افزودن ادمین جدید",
|
||||
[Pages.admin.detail]: "جزئیات ادمین",
|
||||
[Pages.admin.roleList]: "لیست نقشها",
|
||||
[Pages.admin.roleCreate]: "افزودن نقش جدید",
|
||||
[Pages.admin.groupAdd]: "افزودن گروه جدید",
|
||||
[Pages.admin.groupList]: "لیست گروهها",
|
||||
|
||||
// Customers
|
||||
[Pages.customer.list]: "لیست مشتریان",
|
||||
[Pages.customer.create]: "افزودن مشتری جدید",
|
||||
[Pages.customer.update]: "ویرایش مشتری",
|
||||
|
||||
// Coupons
|
||||
[Pages.coupon.list]: "لیست کوپنها",
|
||||
[Pages.coupon.create]: "افزودن کوپن جدید",
|
||||
[Pages.coupon.detail]: "ویرایش کوپن",
|
||||
|
||||
// Blogs
|
||||
[Pages.blog.list]: "لیست بلاگها",
|
||||
[Pages.blog.create]: "افزودن بلاگ جدید",
|
||||
[Pages.blog.category]: "دستهبندیهای بلاگ",
|
||||
[Pages.blog.detail]: "جزئیات بلاگ",
|
||||
[Pages.blog.comments]: "کامنتهای بلاگ",
|
||||
|
||||
// Tickets
|
||||
[Pages.ticket.list]: "لیست تیکتها",
|
||||
[Pages.ticket.create]: "ایجاد تیکت جدید",
|
||||
[Pages.ticket.detail]: "جزئیات تیکت",
|
||||
[Pages.ticket.category.list]: "دستهبندیهای تیکت",
|
||||
[Pages.ticket.category.create]: "افزودن دستهبندی تیکت",
|
||||
[Pages.ticket.category.update]: "ویرایش دستهبندی تیکت",
|
||||
|
||||
// Jobs
|
||||
[Pages.jobs.list]: "لیست آگهیهای شغلی",
|
||||
[Pages.jobs.resumes]: "رزومهها",
|
||||
|
||||
// Contact Us
|
||||
[Pages.contactUs.list]: "لیست تماس با ما",
|
||||
|
||||
// Payment
|
||||
[Pages.payment.list]: "لیست پرداختها",
|
||||
|
||||
// Card Bank
|
||||
[Pages.cardBank.list]: "لیست کارتهای بانکی",
|
||||
[Pages.cardBank.create]: "افزودن کارت بانکی جدید",
|
||||
[Pages.cardBank.detail]: "جزئیات کارت بانکی",
|
||||
|
||||
// Shipment
|
||||
[Pages.shipment.list]: "لیست روشهای ارسال",
|
||||
[Pages.shipment.create]: "افزودن روش ارسال جدید",
|
||||
[Pages.shipment.update]: "ویرایش روش ارسال",
|
||||
|
||||
// Settings
|
||||
[Pages.setting.shop]: "تنظیمات فروشگاه",
|
||||
[Pages.setting.banners]: "تنظیمات بنرها",
|
||||
[Pages.setting.siteSetting]: "تنظیمات سایت",
|
||||
|
||||
// Learning
|
||||
[Pages.learning.list]: "لیست آموزشها",
|
||||
[Pages.learning.create]: "افزودن آموزش جدید",
|
||||
[Pages.learning.category]: "دستهبندیهای آموزشی",
|
||||
|
||||
// Announcements
|
||||
[Pages.announcement.list]: "لیست اعلانات",
|
||||
[Pages.announcement.create]: "افزودن اعلان جدید",
|
||||
|
||||
// Support
|
||||
[Pages.support.list]: "لیست پشتیبانی",
|
||||
[Pages.support.create]: "ایجاد پشتیبانی جدید",
|
||||
|
||||
// Services
|
||||
[Pages.services.list]: "لیست خدمات",
|
||||
|
||||
// Sliders
|
||||
[Pages.sliders.list]: "لیست اسلایدرها",
|
||||
[Pages.sliders.create]: "افزودن اسلایدر جدید",
|
||||
|
||||
// Transactions
|
||||
[Pages.transactions]: "تراکنشها",
|
||||
|
||||
// Receipts
|
||||
[Pages.receipts.index]: "لیست رسیدها",
|
||||
|
||||
// Wallet
|
||||
[Pages.wallet]: "کیف پول",
|
||||
|
||||
// Profile
|
||||
[Pages.profile]: "پروفایل",
|
||||
|
||||
// Buy Users
|
||||
[Pages.buyUsers.list]: "لیست خریداران",
|
||||
|
||||
// Ads
|
||||
[Pages.ads.list]: "لیست تبلیغات",
|
||||
[Pages.ads.create]: "افزودن تبلیغ جدید",
|
||||
[Pages.ads.update]: "ویرایش تبلیغ",
|
||||
|
||||
// Messages
|
||||
[Pages.messages.list]: "لیست پیامها",
|
||||
|
||||
// Referral Code
|
||||
[Pages.referralCode.list]: "لیست کدهای معرف",
|
||||
|
||||
// Pages
|
||||
[Pages.pages.aboutUs]: "درباره ما",
|
||||
[Pages.pages.aboutUsCreate]: "افزودن درباره ما",
|
||||
[Pages.pages.faq]: "سوالات متداول",
|
||||
[Pages.pages.faqCreate]: "افزودن سوال متداول",
|
||||
[Pages.pages.faqUpdate]: "ویرایش سوال متداول",
|
||||
[Pages.pages.shipment]: "روشهای ارسال",
|
||||
[Pages.pages.privacy]: "سیاست حفظ حریم خصوصی",
|
||||
[Pages.pages.returnPolicy]: "سیاست بازگشت کالا",
|
||||
[Pages.pages.jobs]: "آگهیهای شغلی",
|
||||
[Pages.pages.documents]: "مستندات",
|
||||
[Pages.pages.incomeTariff]: "تعرفه درآمد",
|
||||
|
||||
// Feedback
|
||||
[Pages.feedback.list]: "لیست بازخوردها",
|
||||
|
||||
// Criticisms
|
||||
[Pages.criticisms.list]: "لیست انتقادات",
|
||||
|
||||
// Services
|
||||
[Pages.services.list]: "لیست خدمات",
|
||||
|
||||
// Sliders
|
||||
[Pages.sliders.list]: "لیست اسلایدرها",
|
||||
[Pages.sliders.create]: "افزودن اسلایدر جدید",
|
||||
|
||||
// Transactions
|
||||
[Pages.transactions]: "تراکنشها",
|
||||
|
||||
// Receipts
|
||||
[Pages.receipts.index]: "لیست رسیدها",
|
||||
|
||||
// Tickets
|
||||
[Pages.ticket.list]: "لیست تیکتها",
|
||||
[Pages.ticket.create]: "ایجاد تیکت جدید",
|
||||
[Pages.ticket.category.list]: "دستهبندیهای تیکت",
|
||||
|
||||
// Announcements
|
||||
[Pages.announcement.list]: "لیست اعلانات",
|
||||
|
||||
// Feedback
|
||||
[Pages.feedback.list]: "لیست بازخوردها",
|
||||
|
||||
// Learning
|
||||
[Pages.learning.list]: "لیست آموزشها",
|
||||
|
||||
// Pages
|
||||
[Pages.pages.aboutUs]: "درباره ما",
|
||||
[Pages.pages.faq]: "سوالات متداول",
|
||||
[Pages.pages.shipment]: "روشهای ارسال",
|
||||
[Pages.pages.privacy]: "سیاست حفظ حریم خصوصی",
|
||||
[Pages.pages.returnPolicy]: "سیاست بازگشت کالا",
|
||||
[Pages.pages.jobs]: "آگهیهای شغلی",
|
||||
[Pages.pages.documents]: "مستندات",
|
||||
|
||||
// Settings
|
||||
[Pages.setting.shop]: "تنظیمات فروشگاه",
|
||||
[Pages.setting.banners]: "تنظیمات بنرها",
|
||||
[Pages.setting.siteSetting]: "تنظیمات سایت",
|
||||
|
||||
// Wallet
|
||||
[Pages.wallet]: "کیف پول",
|
||||
|
||||
// Profile
|
||||
[Pages.profile]: "پروفایل",
|
||||
|
||||
// Customers
|
||||
[Pages.customer.list]: "لیست مشتریان",
|
||||
|
||||
// Ads
|
||||
[Pages.ads.list]: "لیست تبلیغات",
|
||||
|
||||
// Blogs
|
||||
[Pages.blog.list]: "لیست بلاگها",
|
||||
[Pages.blog.category]: "دستهبندیهای بلاگ",
|
||||
|
||||
// Messages
|
||||
[Pages.messages.list]: "لیست پیامها",
|
||||
|
||||
// Card Bank
|
||||
[Pages.cardBank.list]: "لیست کارتهای بانکی",
|
||||
|
||||
// Reports
|
||||
[Pages.report.product]: "گزارش محصولات",
|
||||
|
||||
// Support
|
||||
[Pages.support.list]: "لیست پشتیبانی",
|
||||
|
||||
// Jobs
|
||||
[Pages.jobs.list]: "لیست آگهیهای شغلی",
|
||||
|
||||
// Contact Us
|
||||
[Pages.contactUs.list]: "لیست تماس با ما",
|
||||
|
||||
// Additional mappings for remaining pages
|
||||
[Pages.services.mine]: "خدمات من",
|
||||
[Pages.services.other]: "خدمات دیگر",
|
||||
[Pages.services.category]: "دستهبندی خدمات",
|
||||
[Pages.services.add]: "افزودن خدمت",
|
||||
[Pages.services.update]: "ویرایش خدمت",
|
||||
[Pages.services.review]: "نظرات خدمات",
|
||||
[Pages.services.guide]: "راهنمای خدمات",
|
||||
[Pages.services.plan]: "طرح خدمات",
|
||||
|
||||
[Pages.sliders.detail]: "جزئیات اسلایدر",
|
||||
|
||||
[Pages.receipts.detail]: "جزئیات رسید",
|
||||
[Pages.receipts.create]: "ایجاد رسید",
|
||||
|
||||
[Pages.ticket.detail]: "جزئیات تیکت",
|
||||
[Pages.ticket.category.create]: "ایجاد دستهبندی تیکت",
|
||||
[Pages.ticket.category.update]: "ویرایش دستهبندی تیکت",
|
||||
|
||||
[Pages.announcement.detail]: "جزئیات اعلان",
|
||||
[Pages.announcement.create]: "ایجاد اعلان",
|
||||
|
||||
[Pages.criticisms.detail]: "جزئیات انتقاد",
|
||||
|
||||
[Pages.learning.detail]: "جزئیات آموزش",
|
||||
[Pages.learning.create]: "ایجاد آموزش",
|
||||
[Pages.learning.category]: "دستهبندی آموزش",
|
||||
|
||||
[Pages.pages.aboutUsCreate]: "ایجاد درباره ما",
|
||||
[Pages.pages.faqCreate]: "ایجاد سوال متداول",
|
||||
[Pages.pages.faqUpdate]: "ویرایش سوال متداول",
|
||||
[Pages.pages.incomeTariff]: "تعرفه درآمد",
|
||||
|
||||
[Pages.buyUsers.list]: "لیست خریداران",
|
||||
|
||||
[Pages.ads.create]: "ایجاد تبلیغ",
|
||||
[Pages.ads.update]: "ویرایش تبلیغ",
|
||||
|
||||
[Pages.blog.detail]: "جزئیات بلاگ",
|
||||
[Pages.blog.comments]: "نظرات بلاگ",
|
||||
[Pages.blog.create]: "ایجاد بلاگ",
|
||||
|
||||
[Pages.messages.detail]: "جزئیات پیام",
|
||||
|
||||
[Pages.customer.create]: "ایجاد مشتری",
|
||||
[Pages.customer.update]: "ویرایش مشتری",
|
||||
|
||||
[Pages.cardBank.create]: "ایجاد کارت بانکی",
|
||||
[Pages.cardBank.detail]: "جزئیات کارت بانکی",
|
||||
|
||||
[Pages.payment.list]: "لیست پرداختها",
|
||||
|
||||
[Pages.report.category]: "گزارش دستهبندی",
|
||||
|
||||
[Pages.support.create]: "ایجاد پشتیبانی",
|
||||
[Pages.support.detail]: "جزئیات پشتیبانی",
|
||||
[Pages.support.planUsers]: "کاربران طرح پشتیبانی",
|
||||
|
||||
[Pages.category.detail]: "جزئیات دستهبندی",
|
||||
|
||||
[Pages.orders.detailUser]: "جزئیات سفارش کاربر",
|
||||
[Pages.orders.detailSeller]: "جزئیات سفارش فروشنده",
|
||||
|
||||
[Pages.jobs.resumes]: "رزومهها",
|
||||
|
||||
[Pages.representative.list]: "لیست نمایندگان",
|
||||
|
||||
[Pages.developers.list]: "لیست توسعهدهندگان",
|
||||
|
||||
[Pages.coupon.detail]: "ویرایش کوپن",
|
||||
|
||||
[Pages.referralCode.list]: "لیست کدهای معرف",
|
||||
|
||||
[Pages.admin.detail]: "جزئیات ادمین",
|
||||
[Pages.admin.roleList]: "لیست نقشها",
|
||||
[Pages.admin.roleCreate]: "ایجاد نقش",
|
||||
[Pages.admin.groupAdd]: "افزودن گروه",
|
||||
[Pages.admin.groupList]: "لیست گروهها",
|
||||
|
||||
[Pages.representative.list]: "لیست نمایندگان",
|
||||
};
|
||||
|
||||
// Function to get page title based on current path
|
||||
export const getPageTitle = (pathname: string): string => {
|
||||
// First try exact match
|
||||
if (PageTitles[pathname as keyof typeof PageTitles]) {
|
||||
return PageTitles[pathname as keyof typeof PageTitles];
|
||||
}
|
||||
|
||||
// Try partial matches for dynamic routes
|
||||
for (const [path, title] of Object.entries(PageTitles)) {
|
||||
if (pathname.startsWith(path)) {
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
||||
// Default title
|
||||
return "پنل مدیریت";
|
||||
};
|
||||
+6
-6
@@ -145,12 +145,12 @@ export const Pages = {
|
||||
planUsers: "/support/plan-users/",
|
||||
},
|
||||
category: {
|
||||
list: "/category/list",
|
||||
create: "/category/create",
|
||||
update: "/category/update/",
|
||||
detail: "/category/",
|
||||
variant: "/category/variant/",
|
||||
attributes: "/category/attributes/",
|
||||
list: "/products/category",
|
||||
create: "/products/category/create",
|
||||
update: "/products/category/update/",
|
||||
detail: "/products/category/",
|
||||
variant: "/products/category/variant/",
|
||||
attributes: "/products/category/attributes/",
|
||||
},
|
||||
products: {
|
||||
create: "/products/create",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC } from 'react'
|
||||
import { type CreateCouponType } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -140,6 +141,7 @@ const CreateCoupon: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت کوپن جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetCoupons, useDeleteCoupon } from './hooks/useCouponData'
|
||||
import { type CouponResponseData } from './types/Types'
|
||||
import PageLoading from '@/components/PageLoading'
|
||||
@@ -44,6 +45,7 @@ const CouponList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن کوپن'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC, useEffect, useRef } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { type CreateCouponType } from './types/Types'
|
||||
@@ -171,6 +172,7 @@ const UpdateCoupon: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش کوپن</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC } from 'react'
|
||||
import { useGetPermissions, useCreateAdmin } from './hooks/useAdminData'
|
||||
import type { CreateAdminType } from './types/Types'
|
||||
@@ -54,6 +55,7 @@ const Create: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت ادمین جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useDeleteAdmin, useGetAdmins } from './hooks/useAdminData'
|
||||
import { useQueryClient } from '@tanstack/react-query'
|
||||
import { type Admin } from './types/Types'
|
||||
@@ -46,6 +47,7 @@ const List: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن ادمین'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC, useEffect } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetPermissions, useGetAdminDetail, useUpdateAdmin } from './hooks/useAdminData'
|
||||
@@ -76,6 +77,7 @@ const Update: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش ادمین</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import { type BlogFormType, type BlogCategory } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -69,6 +70,7 @@ const CreateBlog: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت بلاگ جدید</h1>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { type Blog } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
import PaginationUi from '../../components/PaginationUi'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Td from '../../components/Td'
|
||||
import TrashWithConfrim from '../../components/TrashWithConfrim'
|
||||
import { Edit, Eye } from 'iconsax-react'
|
||||
@@ -41,6 +42,7 @@ const BlogsList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن بلاگ'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useFormik } from 'formik'
|
||||
import { type BlogFormType } from './types/Types'
|
||||
@@ -99,6 +100,7 @@ const UpdateBlog: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش بلاگ</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetCategories, type CategoryTreeNode } from '../category'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateBrandType } from './types/Types'
|
||||
@@ -79,6 +80,7 @@ const Create: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت برند جدید</h1>
|
||||
|
||||
@@ -6,6 +6,7 @@ import Error from '../../components/Error'
|
||||
import PaginationUi from '../../components/PaginationUi'
|
||||
import Td from '../../components/Td'
|
||||
import TrashWithConfrim from '../../components/TrashWithConfrim'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { Edit } from 'iconsax-react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Pages } from '@/config/Pages'
|
||||
@@ -43,6 +44,7 @@ const BrandList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن برند'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams, useNavigate } from 'react-router-dom'
|
||||
import { useGetCategories, type CategoryTreeNode } from '../category'
|
||||
import { useFormik } from 'formik'
|
||||
@@ -99,6 +100,7 @@ const UpdateBrand: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش برند</h1>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import TitleLine from '../../components/TitleLine'
|
||||
import Button from '../../components/Button'
|
||||
import { AttributesModal } from './components'
|
||||
import { useAttributesLogic } from './hooks/useAttributesLogic'
|
||||
@@ -36,7 +36,6 @@ const Attributes: FC = () => {
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<div className="max-w-6xl mx-auto p-6">
|
||||
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
|
||||
<TitleLine title="مدیریت ویژگیهای دستهبندی" />
|
||||
<div className="mt-4 space-y-2">
|
||||
<h1 className="text-2xl font-bold text-gray-900">
|
||||
دستهبندی یافت نشد
|
||||
@@ -53,7 +52,6 @@ const Attributes: FC = () => {
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<div className="max-w-6xl mx-auto p-6">
|
||||
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
|
||||
<TitleLine title="مدیریت ویژگیهای دستهبندی" />
|
||||
<div className="mt-4 space-y-2">
|
||||
<h1 className="text-2xl font-bold text-gray-900">
|
||||
{category.title_fa}
|
||||
@@ -86,9 +84,9 @@ const Attributes: FC = () => {
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<PageTitle />
|
||||
<div className="max-w-6xl mx-auto p-6">
|
||||
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
|
||||
<TitleLine title="مدیریت ویژگیهای دستهبندی" />
|
||||
<div className="mt-4 space-y-2">
|
||||
<h1 className="text-2xl font-bold text-gray-900">
|
||||
{category.title_fa}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Button from '../../components/Button'
|
||||
import { TickCircle, ArrowLeft } from 'iconsax-react'
|
||||
import SwitchComponent from '../../components/Switch'
|
||||
@@ -85,6 +86,7 @@ const CreateCategory: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<button
|
||||
|
||||
@@ -7,6 +7,7 @@ import { type CategoryTreeNode } from './types/Types'
|
||||
import { Pages } from '../../config/Pages'
|
||||
import Button from '../../components/Button'
|
||||
import TrashWithConfrim from '../../components/TrashWithConfrim'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
|
||||
const CategoryList: FC = () => {
|
||||
|
||||
@@ -125,6 +126,7 @@ const CategoryList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن دستهبندی'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Button from '../../components/Button'
|
||||
import { TickCircle, ArrowLeft } from 'iconsax-react'
|
||||
import SwitchComponent from '../../components/Switch'
|
||||
@@ -137,6 +138,7 @@ const UpdateCategory: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<button
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { CategoryThemeEnum } from './enum/Enum'
|
||||
import TitleLine from '../../components/TitleLine'
|
||||
import { VariantSizesList, VariantColorsList, VariantMeteragesList, VariantModal } from './components'
|
||||
import { useVariantLogic } from './hooks/useVariantLogic'
|
||||
|
||||
@@ -32,7 +32,6 @@ const Variant: FC = () => {
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<div className="max-w-6xl mx-auto p-6">
|
||||
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
|
||||
<TitleLine title="مدیریت Variant دستهبندی" />
|
||||
<div className="mt-4 space-y-2">
|
||||
<h1 className="text-2xl font-bold text-gray-900">
|
||||
دستهبندی یافت نشد
|
||||
@@ -110,9 +109,9 @@ const Variant: FC = () => {
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<PageTitle />
|
||||
<div className="max-w-6xl mx-auto p-6">
|
||||
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
|
||||
<TitleLine title="مدیریت Variant دستهبندی" />
|
||||
<div className="mt-4 space-y-2">
|
||||
<h1 className="text-2xl font-bold text-gray-900">
|
||||
{category.title_fa}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetContactUs } from './hooks/useContactUsData';
|
||||
import { type ContactUsItem } from './types';
|
||||
import PageLoading from '../../components/PageLoading';
|
||||
@@ -35,6 +36,7 @@ const ContactUsList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useGetDashboard, useGetOrderChart } from './hooks/useDashboardData'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import DashboardOverview from './components/DashboardOverview'
|
||||
import ProductsCountSection from './components/ProductsCountSection'
|
||||
import OrdersCountSection from './components/OrdersCountSection'
|
||||
@@ -34,15 +35,15 @@ const Dashboard: FC = () => {
|
||||
const renderDashboardContent = () => {
|
||||
const path = location.pathname
|
||||
|
||||
if (path.includes('products-count')) {
|
||||
if (path.includes('product-stats')) {
|
||||
return <ProductsCountSection data={data?.results} />
|
||||
} else if (path.includes('orders-count')) {
|
||||
} else if (path.includes('order-stats')) {
|
||||
return <OrdersCountSection data={data?.results} />
|
||||
} else if (path.includes('unread-comments')) {
|
||||
return <UnreadCommentsSection data={data?.results} />
|
||||
} else if (path.includes('users-count')) {
|
||||
} else if (path.includes('user-stats')) {
|
||||
return <UsersCountSection data={data?.results} />
|
||||
} else if (path.includes('orders-chart')) {
|
||||
} else if (path.includes('order-chart')) {
|
||||
return <OrdersChartSection
|
||||
dashboardData={data?.results}
|
||||
orderChartData={orderChartData?.results}
|
||||
@@ -55,6 +56,7 @@ const Dashboard: FC = () => {
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<PageTitle />
|
||||
{renderDashboardContent()}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type FC } from 'react'
|
||||
import TitleLine from '../../../components/TitleLine'
|
||||
import { type DashboardData } from '../types/Types'
|
||||
import { Box, ShoppingCart, Message, User } from 'iconsax-react'
|
||||
import StatCard from './StatCard'
|
||||
@@ -9,7 +8,6 @@ const DashboardOverview: FC<{ data?: DashboardData }> = ({ data }) => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<TitleLine title="نمای کلی داشبورد" />
|
||||
|
||||
{/* آمار کلی */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type FC } from 'react'
|
||||
import TitleLine from '../../../components/TitleLine'
|
||||
import { type DashboardData, type OrderChartData } from '../types/Types'
|
||||
import { Chart } from 'iconsax-react'
|
||||
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, BarChart, Bar } from 'recharts'
|
||||
@@ -47,8 +46,6 @@ const OrdersChartSection: FC<OrdersChartSectionProps> = ({
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<TitleLine title="نمودار سفارشات" />
|
||||
|
||||
{/* نمودار فروش ۵ روز گذشته */}
|
||||
<div className="bg-white rounded-lg p-6 shadow-sm">
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type FC } from 'react'
|
||||
import TitleLine from '../../../components/TitleLine'
|
||||
import { type DashboardData } from '../types/Types'
|
||||
import { ShoppingCart } from 'iconsax-react'
|
||||
import StatCard from './StatCard'
|
||||
@@ -9,8 +8,6 @@ const OrdersCountSection: FC<{ data?: DashboardData }> = ({ data }) => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<TitleLine title="آمار سفارشات" />
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<StatCard
|
||||
title="سفارشات در حال پردازش"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type FC } from 'react'
|
||||
import TitleLine from '../../../components/TitleLine'
|
||||
import { type DashboardData } from '../types/Types'
|
||||
import { Box, Shop } from 'iconsax-react'
|
||||
import StatCard from './StatCard'
|
||||
@@ -9,8 +8,6 @@ const ProductsCountSection: FC<{ data?: DashboardData }> = ({ data }) => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<TitleLine title="آمار محصولات" />
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<StatCard
|
||||
title="کل محصولات"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type FC } from 'react'
|
||||
import TitleLine from '../../../components/TitleLine'
|
||||
import { type DashboardData } from '../types/Types'
|
||||
import { Message } from 'iconsax-react'
|
||||
import StatCard from './StatCard'
|
||||
@@ -9,8 +8,6 @@ const UnreadCommentsSection: FC<{ data?: DashboardData }> = ({ data }) => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<TitleLine title="کامنتها و پرسشها" />
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<StatCard
|
||||
title="کامنت های خوانده نشده"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { type FC } from 'react'
|
||||
import TitleLine from '../../../components/TitleLine'
|
||||
import { type DashboardData } from '../types/Types'
|
||||
import { User, Shop } from 'iconsax-react'
|
||||
import StatCard from './StatCard'
|
||||
@@ -9,8 +8,6 @@ const UsersCountSection: FC<{ data?: DashboardData }> = ({ data }) => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<TitleLine title="آمار کاربران" />
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<StatCard
|
||||
title="کل کاربران"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetJobs, useDeleteJob } from './hooks/useJobsData'
|
||||
import { type Job } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -52,6 +53,7 @@ const JobsList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<ModalCreateJob />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetResumes } from './hooks/useJobsData'
|
||||
import { type Resume } from './types/Types'
|
||||
import PageLoading from '@/components/PageLoading'
|
||||
@@ -64,6 +65,7 @@ const Resumes: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
@@ -129,4 +131,4 @@ const Resumes: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Resumes
|
||||
export default Resumes
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import ModalCreateCancelReason from './components/ModalCreateCancelReason'
|
||||
import { useGetCancelReasons, useDeleteCancelReason } from './hooks/useOrderData'
|
||||
import { type CancelReasonType } from './types/Types'
|
||||
@@ -37,6 +38,7 @@ const CancellationCategories: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<ModalCreateCancelReason />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetOrderDetailUser } from './hooks/useOrderData'
|
||||
import PageLoading from '@/components/PageLoading'
|
||||
@@ -78,6 +79,7 @@ const OrderDetail: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4 space-y-6'>
|
||||
<PageTitle />
|
||||
{/* هدر */}
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useSearchParams } from 'react-router-dom'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
import PaginationUi from '../../components/PaginationUi'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Td from '../../components/Td'
|
||||
import { Eye } from 'iconsax-react'
|
||||
import { Link } from 'react-router-dom'
|
||||
@@ -105,6 +106,7 @@ const Native: FC = () => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<PageTitle />
|
||||
<h1 className="text-2xl font-bold">{getStatusLabel(status)}</h1>
|
||||
|
||||
<div className='relative overflow-x-auto rounded-3xl bg-white shadow-sm'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import ModalCreateReturnReason from './components/ModalCreateReturnReason'
|
||||
import { useGetReturnReasons, useDeleteReturnReason } from './hooks/useOrderData'
|
||||
import { type ReturnReasonType } from './types/Types'
|
||||
@@ -37,6 +38,7 @@ const ReturnCategories: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<ModalCreateReturnReason />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useSearchParams } from 'react-router-dom'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
@@ -105,6 +106,7 @@ const OrdersSeller: FC = () => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<PageTitle />
|
||||
<h1 className="text-2xl font-bold">{getStatusLabel(status)}</h1>
|
||||
|
||||
<div className='relative overflow-x-auto rounded-3xl bg-white shadow-sm'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC } from 'react'
|
||||
import type { CreateFineType } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -39,6 +40,7 @@ const CreateFine: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت قانون جریمه جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetFines } from './hooks/usePaymentData';
|
||||
import { type FineRule } from './types/Types';
|
||||
import PageLoading from '../../components/PageLoading';
|
||||
@@ -54,6 +55,7 @@ const Fines: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Link to={Pages.financial.createFine}>
|
||||
<Button
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetPayments } from './hooks/usePaymentData'
|
||||
import { type Payment } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -71,6 +72,7 @@ const PaymentList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react';
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useCreateProductDetail, useCreateProductAttribute, useSaveProduct } from './hooks/useProductData';
|
||||
import { useGetBrands } from '../brand/hooks/useBrandData';
|
||||
import { useGetCategories } from '../category/hooks/useCategoryData';
|
||||
@@ -111,6 +112,7 @@ const CreateProduct: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className="mb-8">
|
||||
<h1 className="text-2xl font-bold text-gray-900 mb-2">ایجاد محصول جدید</h1>
|
||||
<div className="flex items-center justify-center space-x-8">
|
||||
|
||||
@@ -8,6 +8,7 @@ import PaginationUi from '../../components/PaginationUi';
|
||||
import StatusWithText from '../../components/StatusWithText';
|
||||
import Td from '../../components/Td';
|
||||
import TrashWithConfrim from '../../components/TrashWithConfrim';
|
||||
import PageTitle from '../../components/PageTitle';
|
||||
import { Edit } from 'iconsax-react';
|
||||
import Button from '@/components/Button';
|
||||
import { Link } from 'react-router-dom';
|
||||
@@ -62,6 +63,7 @@ const List: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن محصول'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetProductVariants, useGetProductById } from './hooks/useProductData'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import PageLoading from '@/components/PageLoading'
|
||||
@@ -94,6 +95,7 @@ const ProductVariant: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<CreateVariant />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react';
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams, useNavigate } from 'react-router-dom';
|
||||
import { useGetProductById } from './hooks/useProductData';
|
||||
import { useUpdateProductDetail, useUpdateProductAttribute, useUpdateProduct } from './hooks/useProductData';
|
||||
@@ -188,6 +189,7 @@ const UpdateProduct: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className="mb-8">
|
||||
<h1 className="text-2xl font-bold text-gray-900 mb-2">بروزرسانی محصول</h1>
|
||||
<div className="flex items-center justify-center space-x-8">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Button from '@/components/Button';
|
||||
import CreateReportCategoryModal from './components/CreateReportCategoryModal.tsx';
|
||||
import { useGetReportCategories } from './hooks/useReportData.ts';
|
||||
@@ -41,6 +42,7 @@ const CategoryReport: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن دستهبندی'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetProductReport } from './hooks/useReportData'
|
||||
import { type Report } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -79,6 +80,7 @@ const ProductReport: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetAnnouncementSeller } from './hooks/useSellerData'
|
||||
import { type Notification } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -51,6 +52,7 @@ const Annoncement: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label="ایجاد اطلاعیه جدید"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetLearningCategory } from './hooks/useSellerData'
|
||||
import { type LearningCategory } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -53,6 +54,7 @@ const CategoryLearning: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label="ایجاد دستهبندی جدید"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import * as Yup from 'yup'
|
||||
import { useGetContentContract, useUpdateContract } from './hooks/useSellerData'
|
||||
@@ -54,6 +55,7 @@ const ContractPage: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>مدیریت قرارداد فروشندگان</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateLearningType } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -80,6 +81,7 @@ const CreateLearning: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت یادگیری جدید</h1>
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useGetLearning } from './hooks/useSellerData'
|
||||
import type { Learning as LearningType } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Td from '../../components/Td'
|
||||
import Button from '@/components/Button'
|
||||
import LearningTableRow from './components/LearningTableRow'
|
||||
@@ -42,6 +43,7 @@ const Learning: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label="ایجاد یادگیری جدید"
|
||||
|
||||
@@ -4,6 +4,7 @@ import { type Seller } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
import PaginationUi from '../../components/PaginationUi'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import Td from '../../components/Td'
|
||||
import SellerTableRow from './components/SellerTableRow'
|
||||
import SellerContractModal from './components/SellerContractModal'
|
||||
@@ -41,6 +42,7 @@ const SellerList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetRequestCreateProduct } from './hooks/useSellerData'
|
||||
import { type ProductRequest } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -40,6 +41,7 @@ const RequestCreateProduct: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams, useNavigate } from 'react-router-dom'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateLearningType } from './types/Types'
|
||||
@@ -106,6 +107,7 @@ const UpdateLearning: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش یادگیری</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useApproveWholesaleRequest, useGetWholesaleRequests } from './hooks/useSellerData'
|
||||
import { type WholesaleRequest } from './types/Types'
|
||||
import { type PagerType } from '../products/types/Types'
|
||||
@@ -48,6 +49,7 @@ const WholeSaleRequest: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetWithdrawalRequests } from './hooks/useSellerData'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import Error from '../../components/Error'
|
||||
@@ -64,6 +65,7 @@ const WithdrawalRequest: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useCreateAboutUs } from './hooks/useSettingData'
|
||||
import { useFormik } from 'formik';
|
||||
import type { CreateAboutUs } from './types/Types';
|
||||
@@ -58,6 +59,7 @@ const AboutUsCreate: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت درباره ما جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useDeleteAboutUs, useGetAboutUs } from './hooks/useSettingData'
|
||||
import { type AboutUsItem } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -47,6 +48,7 @@ const AboutUsList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
onClick={() => navigate(Pages.pages.aboutUsCreate)}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState, type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useDeleteBanner, useGetBanners, useUpdateBanner } from './hooks/useSettingData'
|
||||
import { type BannerItem, type UpdateBannerType } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -62,6 +63,7 @@ const Banners: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className="flex justify-between items-center gap-4 mb-5">
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>مدیریت بنرها</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useCreateFaq } from './hooks/useSettingData'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateFaqType } from './types/Types'
|
||||
@@ -54,6 +55,7 @@ const FaqCreate: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت سوال متداول جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState, type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetFaq, useDeleteFaq } from './hooks/useSettingData'
|
||||
import { FaqPageEnum } from './enum/Enum'
|
||||
import { type FaqItem } from './types/Types'
|
||||
@@ -66,6 +67,7 @@ const FaqList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className="flex justify-between items-center gap-4 mb-5">
|
||||
<div className='w-[200px]'>
|
||||
<Select
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetFaqDetail, useUpdateFaq } from './hooks/useSettingData'
|
||||
import { useFormik } from 'formik'
|
||||
@@ -76,6 +77,7 @@ const FaqUpdate: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش سوال متداول</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useEffect, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetSiteSetting, useUpdateSiteSetting } from './hooks/useSettingData'
|
||||
import { SiteSettingPageEnum } from './enum/Enum'
|
||||
import { useFormik } from 'formik'
|
||||
@@ -60,6 +61,7 @@ const JobsPage: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش فرصتهای شغلی</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetDocuments } from './hooks/useSettingData'
|
||||
import { type DocumentTypeItem } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -54,6 +55,7 @@ const ManageDocument: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن اسناد'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetPricing, useDeletePricing } from './hooks/useSettingData'
|
||||
import { type PricingItem } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -53,6 +54,7 @@ const Pricing: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className="flex justify-between items-center mb-6">
|
||||
<h1 className="">مدیریت قیمتگذاری</h1>
|
||||
<Button
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useEffect, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetSiteSetting, useUpdateSiteSetting } from './hooks/useSettingData'
|
||||
import { SiteSettingPageEnum } from './enum/Enum'
|
||||
import { useFormik } from 'formik'
|
||||
@@ -60,6 +61,7 @@ const PrivacyPage: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش حریم خصوصی</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useEffect, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetSiteSetting, useUpdateSiteSetting } from './hooks/useSettingData'
|
||||
import { SiteSettingPageEnum } from './enum/Enum'
|
||||
import { useFormik } from 'formik'
|
||||
@@ -60,6 +61,7 @@ const ReturnPolicyPage: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش سیاست بازگشت کالا</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useEffect, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetSiteSetting, useUpdateSiteSetting } from './hooks/useSettingData'
|
||||
import { SiteSettingPageEnum } from './enum/Enum'
|
||||
import { useFormik } from 'formik'
|
||||
@@ -60,6 +61,7 @@ const ShipmentPage: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش روش ارسال</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import * as Yup from 'yup'
|
||||
import { useGetShop, useUpdateShop } from './hooks/useSettingData'
|
||||
@@ -85,6 +86,7 @@ const Shop: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش اطلاعات شاپ</h1>
|
||||
@@ -162,4 +164,4 @@ const Shop: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Shop
|
||||
export default Shop
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useEffect, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import * as Yup from 'yup'
|
||||
import { useGetSiteSetting, useUpdateSiteSetting, useGetShop } from './hooks/useSettingData'
|
||||
@@ -206,6 +207,7 @@ const SiteSetting: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>تنظیمات سایت</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateShipper, type Cost } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -72,6 +73,7 @@ const CreateShipment: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت روش ارسال جدید</h1>
|
||||
@@ -225,4 +227,4 @@ const CreateShipment: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default CreateShipment
|
||||
export default CreateShipment
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetShipment, useDeleteShipment } from './hooks/useShipmentData'
|
||||
import { type Shipper } from './types/Types'
|
||||
import PageLoading from '@/components/PageLoading';
|
||||
@@ -57,6 +58,7 @@ const ShippingList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن روش ارسال'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateShipper, type Cost } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -108,6 +109,7 @@ const UpdateShipment: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش روش ارسال</h1>
|
||||
@@ -261,4 +263,4 @@ const UpdateShipment: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default UpdateShipment
|
||||
export default UpdateShipment
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetTicketCategories } from './hooks/useTicketData'
|
||||
import { type ITicketCategory } from './types/Types'
|
||||
import { Pages } from '../../config/Pages'
|
||||
@@ -29,6 +30,7 @@ const Category: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن دستهبندی'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC } from 'react'
|
||||
import { useCreateTicketCategory } from './hooks/useTicketData'
|
||||
import type { CreateTicketCategoryType } from './types/Types'
|
||||
@@ -40,6 +41,7 @@ const Create: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت دستهبندی جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetTicket, useAddTicketMessage } from './hooks/useTicketData'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { type IMessage, type TicketStatus } from './types/Types'
|
||||
@@ -81,6 +82,7 @@ const TicketMessages: FC = () => {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<PageTitle />
|
||||
{/* Ticket Info */}
|
||||
<div className="bg-white rounded-2xl p-6 shadow-sm">
|
||||
<div className="flex items-center gap-2 mb-4">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetTickets } from './hooks/useTicketData'
|
||||
import { type ITicket, type TicketStatus } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -61,6 +62,7 @@ const TicketsList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن تیکت'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormik } from 'formik'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { type FC, useEffect } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetTicketCategory, useUpdateTicketCategory } from './hooks/useTicketData'
|
||||
@@ -61,6 +62,7 @@ const Update: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش دستهبندی</h1>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { type FC } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
|
||||
const TicketsList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
Tickets List
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetUsers } from './hooks/useUserData'
|
||||
import { type User } from './types/Types'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
@@ -37,6 +38,7 @@ const UsersList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='relative overflow-x-auto rounded-3xl mt-5 w-full'>
|
||||
<table className='w-full text-sm'>
|
||||
<thead className='thead'>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateWarrantyType } from './types/Types'
|
||||
import * as Yup from 'yup'
|
||||
@@ -57,6 +58,7 @@ const CreateWarranty: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ساخت گارانتی جدید</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useGetWarranties, useDeleteWarranty } from './hooks/useWarrantyData'
|
||||
import { type Warranty } from './types/Types'
|
||||
import PageLoading from '@/components/PageLoading'
|
||||
@@ -44,6 +45,7 @@ const WarrantyList: FC = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle />
|
||||
<div className='flex justify-end mt-5'>
|
||||
<Button
|
||||
label='افزودن گارانتی'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type FC, useState, useEffect } from 'react'
|
||||
import PageTitle from '../../components/PageTitle'
|
||||
import { useParams, useNavigate } from 'react-router-dom'
|
||||
import { useFormik } from 'formik'
|
||||
import { type CreateWarrantyType } from './types/Types'
|
||||
@@ -79,6 +80,7 @@ const UpdateWarranty: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<PageTitle />
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<h1>ویرایش گارانتی</h1>
|
||||
|
||||
+4
-4
@@ -169,11 +169,11 @@ const MainRouter: FC = () => {
|
||||
<Route path={Pages.contactUs.list} element={<ContactUsList />} />
|
||||
|
||||
<Route path={Pages.dashboard} element={<Dashboard />} />
|
||||
<Route path="/dashboard/products-count" element={<Dashboard />} />
|
||||
<Route path="/dashboard/orders-count" element={<Dashboard />} />
|
||||
<Route path="/dashboard/product-stats" element={<Dashboard />} />
|
||||
<Route path="/dashboard/order-stats" element={<Dashboard />} />
|
||||
<Route path="/dashboard/unread-comments" element={<Dashboard />} />
|
||||
<Route path="/dashboard/users-count" element={<Dashboard />} />
|
||||
<Route path="/dashboard/orders-chart" element={<Dashboard />} />
|
||||
<Route path="/dashboard/user-stats" element={<Dashboard />} />
|
||||
<Route path="/dashboard/order-chart" element={<Dashboard />} />
|
||||
|
||||
<Route path={Pages.sellers.list} element={<SellerList />} />
|
||||
<Route path={Pages.sellers.wholesaleRequests} element={<WholeSaleRequest />} />
|
||||
|
||||
+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