base page title

This commit is contained in:
hamid zarghami
2025-10-15 12:29:37 +03:30
parent 48d79ac3cb
commit 587a2f30b1
99 changed files with 1280 additions and 673 deletions
+2
View File
@@ -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>
+2
View File
@@ -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='افزودن کوپن'
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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='افزودن ادمین'
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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='افزودن بلاگ'
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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='افزودن برند'
+2
View File
@@ -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>
+2 -4
View File
@@ -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}
+2
View File
@@ -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
+2
View File
@@ -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='افزودن دسته‌بندی'
+2
View File
@@ -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
+2 -3
View File
@@ -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}
+2
View File
@@ -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'>
+6 -4
View File
@@ -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="کل کاربران"
+2
View File
@@ -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'>
+3 -1
View File
@@ -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>
+2
View File
@@ -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'>
+2
View File
@@ -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'>
+2
View File
@@ -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>
+2
View File
@@ -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'>
+2
View File
@@ -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>
+2
View File
@@ -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
+2
View File
@@ -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'>
+2
View File
@@ -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">
+2
View File
@@ -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='افزودن محصول'
+2
View File
@@ -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'>
+2
View File
@@ -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">
+2
View File
@@ -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='افزودن دسته‌بندی'
+2
View File
@@ -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'>
+2
View File
@@ -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="ایجاد اطلاعیه جدید"
+2
View File
@@ -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="ایجاد دسته‌بندی جدید"
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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="ایجاد یادگیری جدید"
+2
View File
@@ -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'>
+2
View File
@@ -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>
+2
View File
@@ -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'>
+2
View File
@@ -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'>
+2
View File
@@ -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>
+2
View File
@@ -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)}
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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='افزودن اسناد'
+2
View File
@@ -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
+2
View File
@@ -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>
+2
View File
@@ -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>
+2
View File
@@ -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>
+3 -1
View File
@@ -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
+2
View File
@@ -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>
+3 -1
View File
@@ -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
+2
View File
@@ -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='افزودن روش ارسال'
+3 -1
View File
@@ -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
+2
View File
@@ -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='افزودن دسته‌بندی'
+2
View File
@@ -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>
+2
View File
@@ -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">
+2
View File
@@ -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='افزودن تیکت'
+2
View File
@@ -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>
+2
View File
@@ -1,9 +1,11 @@
import { type FC } from 'react'
import PageTitle from '../../components/PageTitle'
const TicketsList: FC = () => {
return (
<div>
<PageTitle />
Tickets List
</div>
)
+2
View File
@@ -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'>
+2
View File
@@ -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>
+2
View File
@@ -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='افزودن گارانتی'
+2
View File
@@ -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>