request list + structure
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
import Filters from '@/components/Filters'
|
||||
import Table from '@/components/Table'
|
||||
import { type FC } from 'react'
|
||||
|
||||
const RequestList: FC = () => {
|
||||
return (
|
||||
<div className='mt-5'>
|
||||
<h1 className='text-lg font-light'>درخواست ها</h1>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Filters
|
||||
fields={[
|
||||
{
|
||||
name: 'search',
|
||||
type: 'input',
|
||||
placeholder: 'جستجو',
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'select',
|
||||
placeholder: 'وضعیت',
|
||||
options: [
|
||||
{
|
||||
label: 'درحال انتظار',
|
||||
value: 'pending',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'date',
|
||||
type: 'date',
|
||||
placeholder: 'تاریخ',
|
||||
}
|
||||
]}
|
||||
onChange={() => { }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Table
|
||||
columns={[
|
||||
{
|
||||
key: 'id',
|
||||
title: 'شماره',
|
||||
},
|
||||
{
|
||||
key: 'customer',
|
||||
title: 'مشتری',
|
||||
},
|
||||
{
|
||||
key: 'creationDate',
|
||||
title: 'تاریخ ایجاد درخواست',
|
||||
},
|
||||
{
|
||||
key: 'lastApprovalDate',
|
||||
title: 'آخرین مهلت تایید',
|
||||
},
|
||||
{
|
||||
key: 'itemCount',
|
||||
title: 'تعداد اقلام',
|
||||
},
|
||||
{
|
||||
key: 'status',
|
||||
title: 'وضعیت',
|
||||
render: (item) => {
|
||||
return (
|
||||
<div className='h-6 w-fit flex items-center bg-[#FFEDCA] text-[#FF7B00] rounded-full px-2.5 text-xs'>
|
||||
{item.status}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'actions',
|
||||
title: '',
|
||||
},
|
||||
]}
|
||||
data={[
|
||||
{
|
||||
id: 1,
|
||||
customer: 'مشتری 1',
|
||||
creationDate: '2024-01-01',
|
||||
lastApprovalDate: '2024-01-01',
|
||||
itemCount: 10,
|
||||
status: 'درحال انتظار',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
customer: 'مشتری 2',
|
||||
creationDate: '2024-01-01',
|
||||
lastApprovalDate: '2024-01-01',
|
||||
itemCount: 10,
|
||||
status: 'تایید شده',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default RequestList
|
||||
Reference in New Issue
Block a user