order detail

This commit is contained in:
hamid zarghami
2025-11-30 09:17:49 +03:30
parent e8a10b5780
commit a492251e96
2 changed files with 25 additions and 2 deletions
+15 -1
View File
@@ -176,6 +176,11 @@ const OrderDetail: FC = () => {
</div>
<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'>
<StatusWithText
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 className='flex-1'>
<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>گارانتی: {product.variant.warranty.name}</div>
<div>گارانتی: {product.variant.warranty?.name || 'ندارد'}</div>
<div>تعداد: {product.quantity}</div>
<div>قیمت واحد: {formatPrice(product.selling_price)} تومان</div>
{product.shipmentCost > 0 && (
<div>هزینه ارسال: {formatPrice(product.shipmentCost)} تومان</div>
)}
</div>
</div>
+10 -1
View File
@@ -136,7 +136,9 @@ export type VariantType = {
isWholeSale: boolean;
shop: ShopType;
warranty: WarrantyType;
meterage: MeterageType;
saleFormat: SaleFormatType;
themeValue: ThemeValueType;
meterage?: MeterageType;
};
export type PriceType = {
@@ -154,6 +156,13 @@ export type SaleFormatType = {
wholeSale: unknown[];
};
export type ThemeValueType = {
_id: string;
theme: string;
name: string;
value: number;
};
export type ShopType = {
_id: string;
shopName?: string;