diff --git a/src/pages/wallet/wallet-statement/blocks/ShowDetailDialog.tsx b/src/pages/wallet/wallet-statement/blocks/ShowDetailDialog.tsx index 12822c2..90501b1 100644 --- a/src/pages/wallet/wallet-statement/blocks/ShowDetailDialog.tsx +++ b/src/pages/wallet/wallet-statement/blocks/ShowDetailDialog.tsx @@ -101,7 +101,7 @@ const ShowDetailWalletDialog = () => { { accessorKey: 'amount', header: ({ column }: any) => , - enableSorting: true, + enableSorting: false, cell: (info: any) => info.getValue()?.toFixed(2), meta: { headerClassName: 'min-w-[100px]' } }, @@ -162,7 +162,7 @@ const ShowDetailWalletDialog = () => { limit, page: page + 1, with_deleted: false, - order_field: sorting?.[0]?.id ?? 'amount', + order_field: sorting?.[0]?.id ?? 'created_at', order_direction: sorting?.[0]?.desc ? 'ASC' : 'DESC', filter: JSON.stringify(filters) } @@ -191,7 +191,7 @@ const ShowDetailWalletDialog = () => { limit: 10000, page: 1, with_deleted: false, - order_field: 'amount', + order_field: 'created_at', order_direction: 'DESC', filter: JSON.stringify(filters) } @@ -681,7 +681,7 @@ const ShowDetailWalletDialog = () => { columns={columns} pagination={{ size: 5 }} layout={{ card: true }} - sorting={[{ id: 'amount', desc: false }]} + sorting={[{ id: 'created_at', desc: false }]} serverSide={true} onFetchData={({ pageIndex, pageSize, sorting, columnFilters }) => getTransactionLists(pageIndex, pageSize, sorting, columnFilters)