From 2cb20b4975625d99cbd72ac8b05c1ff51110691d Mon Sep 17 00:00:00 2001 From: Mahyar Khanbolooki Date: Tue, 12 Aug 2025 21:10:06 +0330 Subject: [PATCH] add: transaction history page dark theme --- src/app/[name]/(Main)/transactions/page.tsx | 27 +++++++++++---------- src/components/ui/datatable.tsx | 23 ++++++++++-------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/app/[name]/(Main)/transactions/page.tsx b/src/app/[name]/(Main)/transactions/page.tsx index 4c2d7d7..3d64eff 100644 --- a/src/app/[name]/(Main)/transactions/page.tsx +++ b/src/app/[name]/(Main)/transactions/page.tsx @@ -1,4 +1,5 @@ import { DataTableDemo } from '@/components/ui/datatable' +import { ef } from '@/lib/helpers/utfNumbers' import { MoneyRecive, MoneySend, Wallet } from 'iconsax-react' import { ArrowDownLeft, ArrowUpRight } from 'lucide-react' import React from 'react' @@ -11,40 +12,40 @@ function TransactionsReviewIndex() {
- +
مجموع واریز ها - 140,000,000 ریال - - + {ef('140,000,000 ریال')} + +
30%
- +
مجموع برداشت ها - 140,000,000 ریال - - + {ef('140,000,000 ریال')} + +
30%
- +
موجودی کیف پول - 140,000,000 ریال - - + {ef('140,000,000 ریال')} + +
30%
-
+
diff --git a/src/components/ui/datatable.tsx b/src/components/ui/datatable.tsx index 3ea9721..dabc801 100644 --- a/src/components/ui/datatable.tsx +++ b/src/components/ui/datatable.tsx @@ -311,9 +311,9 @@ export type Payment = { export const columns: ColumnDef[] = [ { accessorKey: "id", - header: "شماره", + header: () =>
شماره
, cell: ({ row }) => ( -
{row.getValue("id")}
+
{row.getValue("id")}
), }, { @@ -323,7 +323,7 @@ export const columns: ColumnDef[] = [ }, { accessorKey: "date", - header: () =>
تاریخ
, + header: () =>
تاریخ
, cell: ({ row }) => { const date = parseFloat(row.getValue("date")) @@ -334,12 +334,12 @@ export const columns: ColumnDef[] = [ // }).format(amount) // TODO: convert to jalali - return
{date}
+ return
{date}
}, }, { accessorKey: "status", - header: () =>
وضعیت
, + header: () =>
وضعیت
, cell: ({ row }) => { const status = Boolean(row.getValue("status")) @@ -361,7 +361,7 @@ export const columns: ColumnDef[] = [ return ( <> - + ) }, @@ -399,10 +399,13 @@ export function DataTableDemo() { return (
- +
{table.getHeaderGroups().map((headerGroup) => ( - + {headerGroup.headers.map((header) => { return ( @@ -424,7 +427,7 @@ export function DataTableDemo() { {row.getVisibleCells().map((cell) => ( @@ -451,7 +454,7 @@ export function DataTableDemo() {
- نمایش: {table.getRowModel().rows.length} از {table.getFilteredRowModel().rows.length} + نمایش: {table.getRowModel().rows.length} از {table.getFilteredRowModel().rows.length}