order detail
This commit is contained in:
@@ -176,6 +176,11 @@ const OrderDetail: FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div className='font-medium'>فروشگاه: {item.shop?.shopName}</div>
|
<div className='font-medium'>فروشگاه: {item.shop?.shopName}</div>
|
||||||
|
{item.shipper && (
|
||||||
|
<div className='text-sm text-gray-600 mt-1'>
|
||||||
|
ارسال کننده: {item.shipper.name}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className='flex items-center gap-2 mt-1'>
|
<div className='flex items-center gap-2 mt-1'>
|
||||||
<StatusWithText
|
<StatusWithText
|
||||||
variant={getOrderItemStatusVariant(item.status)}
|
variant={getOrderItemStatusVariant(item.status)}
|
||||||
@@ -209,10 +214,19 @@ const OrderDetail: FC = () => {
|
|||||||
<div key={productIndex} className='flex items-center gap-4 p-4 bg-white rounded-lg border border-gray-100'>
|
<div key={productIndex} className='flex items-center gap-4 p-4 bg-white rounded-lg border border-gray-100'>
|
||||||
<div className='flex-1'>
|
<div className='flex-1'>
|
||||||
<div className='font-medium text-base mb-2'>{product.product.title_fa}</div>
|
<div className='font-medium text-base mb-2'>{product.product.title_fa}</div>
|
||||||
|
{product.variant.themeValue && (
|
||||||
|
<div className='mb-2'>
|
||||||
|
<span className='text-sm font-medium text-gray-700'>تنوع خریداری شده: </span>
|
||||||
|
<span className='text-sm text-blue-600 font-semibold'>{product.variant.themeValue.name}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className='grid grid-cols-2 gap-4 text-sm text-gray-600'>
|
<div className='grid grid-cols-2 gap-4 text-sm text-gray-600'>
|
||||||
<div>گارانتی: {product.variant.warranty.name}</div>
|
<div>گارانتی: {product.variant.warranty?.name || 'ندارد'}</div>
|
||||||
<div>تعداد: {product.quantity}</div>
|
<div>تعداد: {product.quantity}</div>
|
||||||
<div>قیمت واحد: {formatPrice(product.selling_price)} تومان</div>
|
<div>قیمت واحد: {formatPrice(product.selling_price)} تومان</div>
|
||||||
|
{product.shipmentCost > 0 && (
|
||||||
|
<div>هزینه ارسال: {formatPrice(product.shipmentCost)} تومان</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,9 @@ export type VariantType = {
|
|||||||
isWholeSale: boolean;
|
isWholeSale: boolean;
|
||||||
shop: ShopType;
|
shop: ShopType;
|
||||||
warranty: WarrantyType;
|
warranty: WarrantyType;
|
||||||
meterage: MeterageType;
|
saleFormat: SaleFormatType;
|
||||||
|
themeValue: ThemeValueType;
|
||||||
|
meterage?: MeterageType;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PriceType = {
|
export type PriceType = {
|
||||||
@@ -154,6 +156,13 @@ export type SaleFormatType = {
|
|||||||
wholeSale: unknown[];
|
wholeSale: unknown[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ThemeValueType = {
|
||||||
|
_id: string;
|
||||||
|
theme: string;
|
||||||
|
name: string;
|
||||||
|
value: number;
|
||||||
|
};
|
||||||
|
|
||||||
export type ShopType = {
|
export type ShopType = {
|
||||||
_id: string;
|
_id: string;
|
||||||
shopName?: string;
|
shopName?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user