@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="86" height="86" viewBox="0 0 86 86" fill="none">
|
||||
<rect width="86" height="86" fill="#F3F4F6"/>
|
||||
<path d="M28 54L38 42L48 52L58 38L66 54H28Z" fill="#D1D5DB"/>
|
||||
<circle cx="34" cy="32" r="5" fill="#D1D5DB"/>
|
||||
<rect x="22" y="22" width="42" height="42" rx="4" stroke="#D1D5DB" stroke-width="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 352 B |
@@ -72,11 +72,26 @@ const RequestList: FC = () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'itemCount',
|
||||
title: 'تعداد اقلام',
|
||||
key: 'items',
|
||||
title: 'اقلام',
|
||||
render: (item) => {
|
||||
if (!item.items?.length) return <div>—</div>
|
||||
if (item.items.length === 1) {
|
||||
const line = item.items[0]
|
||||
return (
|
||||
<div>
|
||||
{line.product?.title ?? '—'} ({line.quantity.toLocaleString('fa-IR')})
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div>{item.items.length}</div>
|
||||
<div className='flex flex-col gap-0.5'>
|
||||
{item.items.map((line) => (
|
||||
<span key={line.id}>
|
||||
{line.product?.title ?? '—'} ({line.quantity.toLocaleString('fa-IR')})
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
@@ -113,10 +128,7 @@ const RequestList: FC = () => {
|
||||
>
|
||||
<Eye size={20} color='#8C90A3' />
|
||||
</Link>
|
||||
<Link to={Paths.order.edit + item.id}>
|
||||
<Edit2 size={20} color='#0037FF' />
|
||||
</Link>
|
||||
<Receipt21 size={20} color='#FF8000' />
|
||||
|
||||
{/* <Setting2 size={20} color='#00B89F' /> */}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ import { type FC } from 'react'
|
||||
import type { RequestDetailItemType } from '../types/Types'
|
||||
import { useGetEntityField } from '@/pages/formBuilder/hooks/useFormBuilderData'
|
||||
import { Paperclip2 } from 'iconsax-react'
|
||||
import placeholderProductImage from '@/assets/images/placeholder-product.svg'
|
||||
|
||||
type Props = {
|
||||
item: RequestDetailItemType
|
||||
@@ -37,19 +38,21 @@ const RequestItem: FC<Props> = ({ item }) => {
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
|
||||
const productImage = item.product?.images?.[0]
|
||||
|
||||
return (
|
||||
<div key={item.product?.id} className='border border-border rounded-3xl p-6'>
|
||||
<div className='flex items-center justify-between mb-4'>
|
||||
<div>#{item.id}</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-6">
|
||||
{/* Product Image */}
|
||||
<div className='size-[86px] rounded-lg overflow-hidden bg-gray-100'>
|
||||
{item.product?.images?.[0] ? (
|
||||
<img src={item.product.images[0]} alt={item.product?.title} className='size-full object-cover' />
|
||||
) : (
|
||||
<div className='size-full flex items-center justify-center text-desc text-xs'>بدون تصویر</div>
|
||||
)}
|
||||
<img
|
||||
src={productImage || placeholderProductImage}
|
||||
alt={item.product?.title ?? 'محصول'}
|
||||
className='size-full object-cover'
|
||||
onError={(e) => {
|
||||
e.currentTarget.src = placeholderProductImage
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Request Details */}
|
||||
|
||||
Reference in New Issue
Block a user