Update page.tsx
This commit is contained in:
@@ -259,35 +259,35 @@ export default function CustomerManagementPage() {
|
||||
<Table className="[&_tr]:border-b [&_tr]:border-zinc-800 [&_tr:last-child]:border-b-0 [&_td]:border-r [&_td]:border-zinc-800 [&_td:last-child]:border-r-0 [&_th]:border-r [&_th]:border-zinc-800 [&_th:last-child]:border-r-0 [&_tr:hover]:bg-zinc-900/70">
|
||||
<TableHeader className="bg-black/60 sticky top-0 z-10">
|
||||
<TableRow>
|
||||
<TableHead className="w-[250px] text-gray-300">Customer</TableHead>
|
||||
<TableHead className="w-[180px] text-gray-300">Customer</TableHead>
|
||||
<TableHead
|
||||
className="cursor-pointer w-[100px] text-gray-300"
|
||||
className="cursor-pointer w-[100px] text-gray-300 text-center"
|
||||
onClick={() => handleSort("totalOrders")}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
<div className="flex items-center justify-center">
|
||||
Orders
|
||||
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="cursor-pointer w-[150px] text-gray-300"
|
||||
className="cursor-pointer w-[150px] text-gray-300 text-center"
|
||||
onClick={() => handleSort("totalSpent")}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
<div className="flex items-center justify-center">
|
||||
Total Spent
|
||||
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="cursor-pointer w-[180px] text-gray-300"
|
||||
className="cursor-pointer w-[180px] text-gray-300 text-center"
|
||||
onClick={() => handleSort("lastOrderDate")}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
<div className="flex items-center justify-center">
|
||||
Last Order
|
||||
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||
</div>
|
||||
</TableHead>
|
||||
<TableHead className="w-[250px] text-gray-300">Status</TableHead>
|
||||
<TableHead className="w-[250px] text-gray-300 text-center">Status</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
@@ -309,18 +309,18 @@ export default function CustomerManagementPage() {
|
||||
</div>
|
||||
<div className="text-sm text-gray-400">ID: {customer.telegramUserId}</div>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<TableCell className="text-center">
|
||||
<Badge className="bg-gray-700 text-white hover:bg-gray-600">{customer.totalOrders}</Badge>
|
||||
</TableCell>
|
||||
<TableCell className="font-medium text-gray-100">
|
||||
<TableCell className="font-medium text-gray-100 text-center">
|
||||
{formatCurrency(customer.totalSpent)}
|
||||
</TableCell>
|
||||
<TableCell className="text-sm text-gray-100">
|
||||
<TableCell className="text-sm text-gray-100 text-center">
|
||||
{customer.lastOrderDate ? formatDate(customer.lastOrderDate) : "N/A"}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<TableCell className="text-center">
|
||||
{customer.hasOrders ? (
|
||||
<div className="flex space-x-1">
|
||||
<div className="flex justify-center space-x-1">
|
||||
<Badge className="bg-blue-500 text-white hover:bg-blue-600">
|
||||
{customer.ordersByStatus.paid} Paid
|
||||
</Badge>
|
||||
|
||||
Reference in New Issue
Block a user