This commit is contained in:
hamid zarghami
2025-01-26 08:57:06 +03:30
parent be994782da
commit bfb9f3cbcb
6 changed files with 107 additions and 11 deletions
-3
View File
@@ -3401,10 +3401,7 @@
"version": "3.7.6", "version": "3.7.6",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
"integrity": "sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw==", "integrity": "sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw==",
<<<<<<< HEAD
"dev": true, "dev": true,
=======
>>>>>>> add-discount-blog
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"
+10 -5
View File
@@ -4,6 +4,7 @@ import persian from 'react-date-object/calendars/persian';
import persian_fa from 'react-date-object/locales/persian_fa'; import persian_fa from 'react-date-object/locales/persian_fa';
import DateObject from 'react-date-object'; import DateObject from 'react-date-object';
import CalenderIcon from '../assets/images/calendar.svg' import CalenderIcon from '../assets/images/calendar.svg'
import { clx } from '../helpers/utils';
type Props = { type Props = {
onChange: (date: string) => void; onChange: (date: string) => void;
@@ -13,7 +14,7 @@ type Props = {
reset?: boolean; reset?: boolean;
isDateTime?: boolean; isDateTime?: boolean;
className?: string; className?: string;
label: string label?: string
}; };
const DatePickerComponent: FC<Props> = (props: Props) => { const DatePickerComponent: FC<Props> = (props: Props) => {
@@ -45,10 +46,14 @@ const DatePickerComponent: FC<Props> = (props: Props) => {
return ( return (
<div className="w-full"> <div className="w-full">
<div className='text-sm'> {props.label &&
{props.label} <div className='text-sm'>
</div> {props.label}
<div className='relative mt-1.5'> </div>}
<div className={clx(
'relative ',
props.label && 'mt-1.5'
)}>
<DatePicker <DatePicker
placeholder={props.placeholder} placeholder={props.placeholder}
value={value} value={value}
+4 -3
View File
@@ -45,7 +45,7 @@ export const Pages = {
}, },
discount: { discount: {
list: "/discounts/list", list: "/discounts/list",
create: "/discounts/create" create: "/discounts/create",
}, },
referralCode: { referralCode: {
list: "/referral-code/list", list: "/referral-code/list",
@@ -55,15 +55,16 @@ export const Pages = {
}, },
ads: { ads: {
list: "/ads/list", list: "/ads/list",
create: "/ads/create" create: "/ads/create",
}, },
blog: { blog: {
list: "/blog/list", list: "/blog/list",
create: "/blog/create", create: "/blog/create",
category: "/blog/category" category: "/blog/category",
}, },
messages: { messages: {
list: "/messages/list", list: "/messages/list",
detail: "/messages/detail/",
}, },
customer: { customer: {
list: "/customers/list", list: "/customers/list",
+9
View File
@@ -472,5 +472,14 @@
"city": "شهر", "city": "شهر",
"password": "رمز عبور", "password": "رمز عبور",
"reapeat_password": "تکرار رمز عبور" "reapeat_password": "تکرار رمز عبور"
},
"messages": {
"messages_list": "لیست پیام ها",
"submit_date": "تاریخ ثبت",
"number": "شماره",
"fullName": "نام و نام خانوادگی",
"email": "ایمیل",
"subject": "موضوع",
"date": "تاریخ"
} }
} }
+82
View File
@@ -0,0 +1,82 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Td from '../../components/Td'
import { Link } from 'react-router-dom'
import { Pages } from '../../config/Pages'
import { Eye } from 'iconsax-react'
import DatePickerComponent from '../../components/DatePicker'
import Input from '../../components/Input'
const MessagesList: FC = () => {
const { t } = useTranslation('global')
return (
<div className='mt-4'>
<div>
{t('messages.messages_list')}
</div>
<div className='mt-6 flex justify-between items-center'>
<div>
<DatePickerComponent
onChange={() => { }}
placeholder={t('messages.submit_date')}
/>
</div>
<div>
<Input
placeholder={t('search')}
variant='search'
className='bg-white border'
/>
</div>
</div>
<div className='relative overflow-x-auto rounded-3xl mt-9 w-full'>
<table className='w-full text-sm '>
<thead className='thead'>
<tr>
<Td text={t('messages.number')} />
<Td text={t('messages.fullName')} />
<Td text={t('messages.email')} />
<Td text={t('messages.subject')} />
<Td text={t('messages.date')} />
<Td text={''} />
</tr>
</thead>
<tbody>
<tr className='tr'>
<Td text={'۱۲۳۳۴'} />
<Td text={'سیما فرهادی'} />
<Td text={'info@example.com'} />
<Td text={'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ'} />
<Td text={'(۲۰۲۴-۱۱-۱) ۱۴۰۳/۰۹/۰۱'} />
<Td text={''}>
<Link to={Pages.messages.detail + '1'}>
<Eye size={20} color='black' />
</Link>
</Td>
</tr>
<tr className='tr'>
<Td text={'۱۲۳۳۴'} />
<Td text={'سیما فرهادی'} />
<Td text={'info@example.com'} />
<Td text={'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ'} />
<Td text={'(۲۰۲۴-۱۱-۱) ۱۴۰۳/۰۹/۰۱'} />
<Td text={''}>
<Link to={Pages.messages.detail + '1'}>
<Eye size={20} color='black' />
</Link>
</Td>
</tr>
</tbody>
</table>
</div>
</div>
)
}
export default MessagesList
+2
View File
@@ -37,6 +37,7 @@ import Category from '../pages/service/Category'
import CustomerList from '../pages/customer/List' import CustomerList from '../pages/customer/List'
import CreateCustomer from '../pages/customer/Create' import CreateCustomer from '../pages/customer/Create'
import TicketCategory from '../pages/ticket/Category' import TicketCategory from '../pages/ticket/Category'
import MessagesList from '../pages/messages/List'
const MainRouter: FC = () => { const MainRouter: FC = () => {
@@ -86,6 +87,7 @@ const MainRouter: FC = () => {
<Route path={Pages.profile} element={<Profile />} /> <Route path={Pages.profile} element={<Profile />} />
<Route path={Pages.customer.list} element={<CustomerList />} /> <Route path={Pages.customer.list} element={<CustomerList />} />
<Route path={Pages.customer.create} element={<CreateCustomer />} /> <Route path={Pages.customer.create} element={<CreateCustomer />} />
<Route path={Pages.messages.list} element={<MessagesList />} />
</Routes> </Routes>
</div> </div>