diff --git a/app/dashboard/orders/[id]/page.tsx b/app/dashboard/orders/[id]/page.tsx index b4c49b6..dfb10f3 100644 --- a/app/dashboard/orders/[id]/page.tsx +++ b/app/dashboard/orders/[id]/page.tsx @@ -61,6 +61,14 @@ interface Order { }>; totalPrice: number; trackingNumber?: string; + telegramUsername?: string; + telegramBuyerId?: string; + review?: { + text: string; + date: string; + stars: number; + _id: string; + }; } interface OrderInList extends Order { @@ -551,19 +559,19 @@ export default function OrderDetailsPage() { {productNames[product.productId] || "Loading..."} {product.quantity} - ${product.pricePerUnit.toFixed(2)} - ${product.totalItemPrice.toFixed(2)} + £{product.pricePerUnit.toFixed(2)} + £{product.totalItemPrice.toFixed(2)} ))} Shipping ({order?.shippingMethod.type}) - ${order?.shippingMethod.price.toFixed(2)} + £{order?.shippingMethod.price.toFixed(2)} Total - ${order?.totalPrice.toFixed(2)} + £{order?.totalPrice.toFixed(2)} @@ -576,6 +584,44 @@ export default function OrderDetailsPage() { Customer Details + {(order?.telegramUsername || order?.telegramBuyerId) && ( +
+ +
+ {order?.telegramUsername && ( +
+ Username +
+ @{order.telegramUsername} + +
+
+ )} + {order?.telegramBuyerId && ( +
+ Buyer ID +
+ {order?.telegramBuyerId} + +
+
+ )} +
+
+ )} +
@@ -741,6 +787,47 @@ export default function OrderDetailsPage() { )} + + {/* Review Card */} + {order?.review && ( + + + Customer Review + + +
+ {[...Array(5)].map((_, i) => ( + + + + ))} +
+
+ {new Date(order?.review?.date || '').toLocaleString('en-GB', { + day: 'numeric', + month: 'short', + year: 'numeric', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: false + })} +
+
+ {order?.review?.text} +
+
+
+ )}