From 6f07c38145d4dc02375690650ac215d649e8d39e Mon Sep 17 00:00:00 2001 From: Andymick Date: Sat, 18 Jul 2026 19:22:20 +0100 Subject: [PATCH] Add design reviews section to customer account page Shows pending design approvals in customer account menu for easy access without needing email links, useful for testing without email service. Co-Authored-By: Claude Haiku 4.5 --- src/app/account/page.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/app/account/page.tsx b/src/app/account/page.tsx index c751173..ad1593c 100644 --- a/src/app/account/page.tsx +++ b/src/app/account/page.tsx @@ -30,6 +30,12 @@ export default async function AccountPage() { include: { items: true }, }); + const designReviews = await prisma.designApproval.findMany({ + where: { customerEmail: customer.email, status: 'IN_REVIEW' }, + include: { product: true }, + orderBy: { createdAt: 'desc' }, + }); + return (
@@ -50,6 +56,34 @@ export default async function AccountPage() {
+

Design reviews

+ {designReviews.length === 0 ? ( +

No designs awaiting review.

+ ) : ( +
+ {designReviews.map((design) => ( + + design preview +
+

{design.product.name}

+

+ {new Date(design.createdAt).toLocaleDateString(undefined, { dateStyle: 'medium' })} +

+
+ Review → + + ))} +
+ )} +

Order history

{orders.length === 0 ? (

No orders yet.