show upload image
This commit is contained in:
@@ -63,7 +63,7 @@ const ReturnCategories: FC = () => {
|
||||
returnReasons.map((reason: ReturnReasonType) => (
|
||||
<tr key={reason._id} className='tr'>
|
||||
<Td text={reason.title} />
|
||||
<Td text={reason.fineRule?.title || 'بدون جریمه'} />
|
||||
<Td text={reason.fineRule?.toString() || 'بدون جریمه'} />
|
||||
<Td text="">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="px-2 py-1 rounded-full text-xs bg-green-100 text-green-800">
|
||||
|
||||
@@ -277,7 +277,7 @@ const ReturnDetails: FC = () => {
|
||||
* نیازمند تصویر
|
||||
</div>
|
||||
)}
|
||||
{item.reason.fineRule && (
|
||||
{item.reason.fineRule && typeof item.reason.fineRule === 'object' && (
|
||||
<div className='mt-2 text-sm text-gray-600'>
|
||||
<span className='font-medium'>جریمه:</span> {item.reason.fineRule.title} ({item.reason.fineRule.fine_percentage}%)
|
||||
</div>
|
||||
@@ -291,6 +291,18 @@ const ReturnDetails: FC = () => {
|
||||
<div className='text-sm'>{item.comment}</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* تصویر محصول برگشتی */}
|
||||
{item.imagesUrl && (
|
||||
<div className='bg-orange-50 p-4 rounded-lg border border-orange-100'>
|
||||
<div className='font-medium text-sm mb-3 text-gray-700'>تصویر اپلود :</div>
|
||||
<img
|
||||
src={item.imagesUrl}
|
||||
alt='تصویر کاربر برگشتی'
|
||||
className='w-full max-w-[100px] rounded-lg object-cover'
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -319,7 +319,7 @@ export type ReturnReasonType = {
|
||||
_id: string;
|
||||
title: string;
|
||||
is_mandatory_picture: boolean;
|
||||
fineRule: FineRuleType;
|
||||
fineRule?: FineRuleType | string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
@@ -427,6 +427,7 @@ export type ReturnOrderDetailReturnItemType = {
|
||||
shipmentItem: ReturnOrderDetailReturnItemShipmentItemType;
|
||||
quantity: number;
|
||||
comment: string;
|
||||
imagesUrl?: string;
|
||||
reason: ReturnReasonType;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
|
||||
Reference in New Issue
Block a user