Changes
This commit is contained in:
@@ -15,11 +15,12 @@ interface OrderItem {
|
||||
id: string;
|
||||
product_id: string;
|
||||
quantity: number;
|
||||
price: number;
|
||||
products: {
|
||||
title: string;
|
||||
type: string;
|
||||
slug: string;
|
||||
price: number;
|
||||
sale_price: number | null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,8 +73,7 @@ export default function OrderDetail() {
|
||||
id,
|
||||
product_id,
|
||||
quantity,
|
||||
price,
|
||||
products (title, type, slug)
|
||||
products (title, type, slug, price, sale_price)
|
||||
)
|
||||
`)
|
||||
.eq("id", id)
|
||||
@@ -279,7 +279,7 @@ export default function OrderDetail() {
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p className="font-medium">{formatIDR(item.price)}</p>
|
||||
<p className="font-medium">{formatIDR(item.products.sale_price || item.products.price)}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user