up
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-06-26 11:19:05 +03:30
parent d6a5697998
commit 44cb2f099d
3 changed files with 36 additions and 15 deletions
@@ -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

+19 -7
View File
@@ -72,11 +72,26 @@ const RequestList: FC = () => {
} }
}, },
{ {
key: 'itemCount', key: 'items',
title: 'تعداد اقلام', title: 'اقلام',
render: (item) => { 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 ( 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' /> <Eye size={20} color='#8C90A3' />
</Link> </Link>
<Link to={Paths.order.edit + item.id}>
<Edit2 size={20} color='#0037FF' />
</Link>
<Receipt21 size={20} color='#FF8000' />
{/* <Setting2 size={20} color='#00B89F' /> */} {/* <Setting2 size={20} color='#00B89F' /> */}
</div> </div>
) )
+11 -8
View File
@@ -2,6 +2,7 @@ import { type FC } from 'react'
import type { RequestDetailItemType } from '../types/Types' import type { RequestDetailItemType } from '../types/Types'
import { useGetEntityField } from '@/pages/formBuilder/hooks/useFormBuilderData' import { useGetEntityField } from '@/pages/formBuilder/hooks/useFormBuilderData'
import { Paperclip2 } from 'iconsax-react' import { Paperclip2 } from 'iconsax-react'
import placeholderProductImage from '@/assets/images/placeholder-product.svg'
type Props = { type Props = {
item: RequestDetailItemType item: RequestDetailItemType
@@ -37,19 +38,21 @@ const RequestItem: FC<Props> = ({ item }) => {
window.open(url, '_blank') window.open(url, '_blank')
} }
const productImage = item.product?.images?.[0]
return ( return (
<div key={item.product?.id} className='border border-border rounded-3xl p-6'> <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"> <div className="flex items-center gap-6">
{/* Product Image */} {/* Product Image */}
<div className='size-[86px] rounded-lg overflow-hidden bg-gray-100'> <div className='size-[86px] rounded-lg overflow-hidden bg-gray-100'>
{item.product?.images?.[0] ? ( <img
<img src={item.product.images[0]} alt={item.product?.title} className='size-full object-cover' /> src={productImage || placeholderProductImage}
) : ( alt={item.product?.title ?? 'محصول'}
<div className='size-full flex items-center justify-center text-desc text-xs'>بدون تصویر</div> className='size-full object-cover'
)} onError={(e) => {
e.currentTarget.src = placeholderProductImage
}}
/>
</div> </div>
{/* Request Details */} {/* Request Details */}