From f1e75832190a82650170f2657596f74de078aa6c Mon Sep 17 00:00:00 2001
From: NotII <46204250+NotII@users.noreply.github.com>
Date: Sat, 26 Jul 2025 22:32:47 +0200
Subject: [PATCH] Add paidAt field and display to order details and table
Introduces the optional 'paidAt' field to the Order interface and updates both the order details page and the order table to display the payment date. Also adds sorting by 'paidAt' in the order table and improves date formatting for both order and payment dates.
---
app/dashboard/orders/[id]/page.tsx | 39 ++++++++++++++++++++++++++++++
components/tables/order-table.tsx | 18 ++++++++++++--
2 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/app/dashboard/orders/[id]/page.tsx b/app/dashboard/orders/[id]/page.tsx
index 7249968..177c8ad 100644
--- a/app/dashboard/orders/[id]/page.tsx
+++ b/app/dashboard/orders/[id]/page.tsx
@@ -53,6 +53,8 @@ interface Order {
totalItemPrice: number;
}>;
totalPrice: number;
+ orderDate: Date;
+ paidAt?: Date;
trackingNumber?: string;
telegramUsername?: string;
telegramBuyerId?: string;
@@ -774,6 +776,43 @@ export default function OrderDetailsPage() {
{/* Right Column - Actions and Status */}
+ {/* Order Information Card */}
+
+
+ Order Information
+
+
+