This commit is contained in:
gpt-engineer-app[bot]
2025-12-19 16:37:01 +00:00
parent 461a14dfdc
commit cc7c330e83
13 changed files with 756 additions and 14 deletions

View File

@@ -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>