customers and service

This commit is contained in:
hamid zarghami
2025-01-25 15:07:46 +03:30
parent d0c8a14be4
commit 0861501f48
11 changed files with 667 additions and 7 deletions
+19 -2
View File
@@ -6,6 +6,8 @@ import Quill from 'quill';
import SwitchComponent from '../../components/Switch';
import CheckBoxComponent from '../../components/CheckBoxComponent';
import UploadBoxDraggble from '../../components/UploadBoxDraggble';
import Button from '../../components/Button';
import { TickCircle } from 'iconsax-react';
const AddService: FC = () => {
@@ -29,8 +31,23 @@ const AddService: FC = () => {
return (
<div className='w-full mt-4'>
<div>
{t('service.add_service')}
<div className='flex w-full justify-between items-center'>
<div>
{t('service.add_service')}
</div>
<div>
<Button
className='px-5'
>
<div className='flex gap-2'>
<TickCircle
className='size-5'
color='#fff'
/>
<div>{t('service.submit_service')}</div>
</div>
</Button>
</div>
</div>
<div className='flex gap-6'>
<div className='flex-1'>
+137
View File
@@ -0,0 +1,137 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Select from '../../components/Select'
import Input from '../../components/Input'
import Td from '../../components/Td'
import SwitchComponent from '../../components/Switch'
import UploadBoxDraggble from '../../components/UploadBoxDraggble'
import Button from '../../components/Button'
import { TickCircle } from 'iconsax-react'
const Category: FC = () => {
const { t } = useTranslation('global')
return (
<div className='mt-4'>
<div>
{t('service.cateory_services')}
</div>
<div className='flex gap-6 mt-9'>
<div className='flex-1'>
<div className='flex justify-between items-center'>
<div className='w-32'>
<Select
items={[
{ label: 'All', value: 'all' },
{ label: 'Active', value: 'active' },
{ label: 'Inactive', value: 'inactive' },
]}
placeholder={t('service.category')}
/>
</div>
<div className='w-40'>
<Input
variant='search'
placeholder={t('search')}
className='bg-white'
/>
</div>
</div>
<div className='flex-1 mt-8 bg-white py-2 xl:px-10 px-5 rounded-3xl'>
<div className='relative overflow-x-auto rounded-3xl w-full'>
<table className='w-full text-sm '>
<thead className='thead'>
<tr>
<Td text='' />
<Td text={t('service.title')} />
<Td text={t('service.parent_category')} />
<Td text={t('service.count_sub_category')} />
<Td text={t('service.count_service')} />
<Td text={t('ticket.status')} />
<Td text={''} />
</tr>
</thead>
<tbody>
<tr className='tr'>
<Td text=''>
<div className='size-10 rounded-lg bg-red-100'></div>
</Td>
<Td text={'کسب و کار'} />
<Td text={'-'} />
<Td text={'2'} />
<Td text={'14'} />
<Td text={''}>
<SwitchComponent
active
onChange={() => null}
/>
</Td>
<Td text={''} />
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div className='bg-white p-8 w-sidebar hidden xl:block rounded-3xl overflow-hidden relative'>
<div>
{t('service.add_category')}
</div>
<div className='mt-8 flex justify-between'>
<div className='text-sm'>
{t('service.status_category')}
</div>
<div className='flex'>
<SwitchComponent active onChange={() => { }} />
</div>
</div>
<div className='mt-8'>
<Input
label={t('service.title_category')}
/>
</div>
<div className='mt-6'>
<Select
label={t('service.category_parent_2')}
items={[
{ label: 'All', value: 'all' },
{ label: 'Active', value: 'active' },
{ label: 'Inactive', value: 'inactive' },
]}
placeholder={t('select')}
/>
</div>
<div className='mt-6'>
<UploadBoxDraggble
label={t('service.icon_serice_category')}
onChange={() => null}
/>
</div>
<div className='flex flex-1 justify-end items-end mt-8'>
<Button
className='w-fit px-5'
>
<div className='flex items-center gap-2'>
<TickCircle
className='size-5'
color='white'
/>
<div>{t('save')}</div>
</div>
</Button>
</div>
</div>
</div>
</div>
)
}
export default Category
+110
View File
@@ -0,0 +1,110 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Button from '../../components/Button'
import { Add, Eye } from 'iconsax-react'
import Select from '../../components/Select'
import Input from '../../components/Input'
import Td from '../../components/Td'
import { Link } from 'react-router-dom'
import { Pages } from '../../config/Pages'
import SwitchComponent from '../../components/Switch'
const ListService: FC = () => {
const { t } = useTranslation('global')
return (
<div className='mt-4'>
<div className='flex w-full justify-between items-center'>
<div>
{t('service.list_service')}
</div>
<div>
<Button
className='px-5'
>
<div className='flex gap-2'>
<Add
className='size-5'
color='#fff'
/>
<div>{t('service.submit_service')}</div>
</div>
</Button>
</div>
</div>
<div className='flex justify-between items-center mt-12'>
<div className='flex gap-4'>
<Select
className='w-36'
items={[
{ label: 'All', value: 'all' },
{ label: 'Active', value: 'active' },
{ label: 'Inactive', value: 'inactive' },
]}
placeholder={t('service.category')}
/>
<Select
className='w-36'
items={[
{ label: 'All', value: 'all' },
{ label: 'Active', value: 'active' },
{ label: 'Inactive', value: 'inactive' },
]}
placeholder={t('service.status')}
/>
</div>
<div>
<Input
variant='search'
placeholder={t('service.search')}
className='bg-white border border-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='' />
<Td text={t('service.title')} />
<Td text={t('service.company_developed')} />
<Td text={t('service.category')} />
<Td text={t('service.publish_date')} />
<Td text={t('ticket.status')} />
<Td text={t('ticket.detail')} />
<Td text={''} />
</tr>
</thead>
<tbody>
<tr className='tr'>
<Td text=''>
<div className='size-10 rounded-lg bg-red-100'></div>
</Td>
<Td text={'دی منو'} />
<Td text={'شرکت داناک'} />
<Td text={'رستوران'} />
<Td text={'۱۴۰۳/۰۹/۳۰'} />
<Td text={''}>
<SwitchComponent
active
onChange={() => null}
/>
</Td>
<Td text={''}>
<Link to={Pages.ticket.detail + '1'}>
<Eye size={20} color='#8C90A3' />
</Link>
</Td>
<Td text={''} />
</tr>
</tbody>
</table>
</div>
</div>
)
}
export default ListService