detail request
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { type FC } from 'react'
|
import { type FC } from 'react'
|
||||||
import { Receipt1 } from 'iconsax-react'
|
|
||||||
import { useParams } from 'react-router-dom'
|
import { useParams } from 'react-router-dom'
|
||||||
import { useGetRequestDetails } from './hooks/useRequestData'
|
import { useGetRequestDetails } from './hooks/useRequestData'
|
||||||
import TicketSection from './components/TicketSection'
|
import TicketSection from './components/TicketSection'
|
||||||
@@ -14,19 +13,14 @@ const RequestDetail: FC = () => {
|
|||||||
{/* Header Section */}
|
{/* Header Section */}
|
||||||
<div className="flex items-start justify-between mb-6">
|
<div className="flex items-start justify-between mb-6">
|
||||||
<div className="text-sm text-[#8C90A3]">
|
<div className="text-sm text-[#8C90A3]">
|
||||||
سفارش #{data?.data?.orderNumber}
|
درخواست #{data?.data?.requestNumber}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Order Information Section */}
|
{/* Order Information Section */}
|
||||||
<div className="bg-white rounded-2xl p-6 mb-6">
|
<div className="bg-white rounded-2xl p-6 mb-6">
|
||||||
<div className='flex justify-between items-center'>
|
<div className='flex justify-between items-center'>
|
||||||
<h2 className="text-lg font-light mb-6">اطلاعات سفارش</h2>
|
<h2 className="text-lg font-light mb-6">اطلاعات درخواست</h2>
|
||||||
|
|
||||||
<a href="#" className="flex items-center gap-2 text-[#0037FF] text-sm">
|
|
||||||
<Receipt1 size={20} color="#3B82F6" />
|
|
||||||
<span>پیش فاکتور</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div className='flex flex-col gap-10'>
|
<div className='flex flex-col gap-10'>
|
||||||
{
|
{
|
||||||
@@ -45,29 +39,39 @@ const RequestDetail: FC = () => {
|
|||||||
<div className="text-xs text-desc">عنوان:</div>
|
<div className="text-xs text-desc">عنوان:</div>
|
||||||
<div className="text-sm font-medium text-black">{item.product.title}</div>
|
<div className="text-sm font-medium text-black">{item.product.title}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex items-center gap-2'>
|
|
||||||
<div className="text-xs text-desc">نام طرح:</div>
|
|
||||||
<div className="text-sm font-medium text-black">{'orderData.designer'}</div>
|
|
||||||
</div>
|
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
<div className="text-xs text-desc">تعداد:</div>
|
<div className="text-xs text-desc">تعداد:</div>
|
||||||
<div className="text-sm font-medium text-black">{item.quantity}</div>
|
<div className="text-sm font-medium text-black">{item.quantity}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex items-center gap-2'>
|
|
||||||
<div className="text-xs text-desc">تخمین زمان:</div>
|
|
||||||
<div className="text-sm font-medium text-black">{data?.data?.estimatedDays}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Order Description */}
|
{/* Order Description */}
|
||||||
<div className="mt-6 pt-6 border-t border-dashed border-desc">
|
<div className="mt-6 pt-6 border-t border-dashed border-desc">
|
||||||
<div className="text-sm font-medium mb-2 text-desc">شرح سفارش:</div>
|
<div className="text-sm font-medium mb-2 text-desc">شرح درخواست:</div>
|
||||||
<p className="text-sm font-light text-black leading-6">
|
<p className="text-sm font-light text-black leading-6">
|
||||||
{item.description || '—'}
|
{item.description || '—'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Attributes */}
|
||||||
|
{/* {fields?.data?.length ? (
|
||||||
|
<>
|
||||||
|
<div className='font-bold mb-5 mt-7'>ویژگی ها</div>
|
||||||
|
{
|
||||||
|
fields.data.map((field) => {
|
||||||
|
const value = item.attributes?.find((o) => String(o.attributeId) === String(field.id))
|
||||||
|
return (
|
||||||
|
<div className='flex gap-3 items-center mt-3' key={field.id}>
|
||||||
|
<div className='text-sm text-gray-500'>{field.name}:</div>
|
||||||
|
<div className='text-sm -mt-px'>{value?.value || '-'}</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
) : null} */}
|
||||||
|
|
||||||
{/* Attachments */}
|
{/* Attachments */}
|
||||||
{item.attachments?.length ? (
|
{item.attachments?.length ? (
|
||||||
<div className="mt-6 pt-6 border-t border-dashed border-desc">
|
<div className="mt-6 pt-6 border-t border-dashed border-desc">
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ const TicketSection: FC = () => {
|
|||||||
<div className='flex justify-end'>
|
<div className='flex justify-end'>
|
||||||
<div className='bg-[#F5F7FC] rounded-4xl rounded-tl-none mt-6 p-6 max-w-[55%]'>
|
<div className='bg-[#F5F7FC] rounded-4xl rounded-tl-none mt-6 p-6 max-w-[55%]'>
|
||||||
<div className='flex gap-1 text-sm mb-2'>
|
<div className='flex gap-1 text-sm mb-2'>
|
||||||
<div className='font-bold'>طراح : </div>
|
<div className='font-bold'>پشتیبان : </div>
|
||||||
<div>{item.admin?.firstName + ' ' + item?.admin?.lastName}</div>
|
<div>{item.admin?.firstName + ' ' + item?.admin?.lastName}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='text-sm font-light text-black leading-6'>
|
<div className='text-sm font-light text-black leading-6'>
|
||||||
@@ -166,12 +166,6 @@ const TicketSection: FC = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<div className="text-sm mb-2 text-black">پیام شما</div>
|
<div className="text-sm mb-2 text-black">پیام شما</div>
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ export type StoreType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export interface MyRequestType extends RowDataType {
|
export interface MyRequestType extends RowDataType {
|
||||||
|
requestNumber: number;
|
||||||
balance: number;
|
balance: number;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
discount: number;
|
discount: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user