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
+11 -8
View File
@@ -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 */}