sort detail wallet statement by created at
This commit is contained in:
@ -101,7 +101,7 @@ const ShowDetailWalletDialog = () => {
|
|||||||
{
|
{
|
||||||
accessorKey: 'amount',
|
accessorKey: 'amount',
|
||||||
header: ({ column }: any) => <DataGridColumnHeader title="Amount" column={column} />,
|
header: ({ column }: any) => <DataGridColumnHeader title="Amount" column={column} />,
|
||||||
enableSorting: true,
|
enableSorting: false,
|
||||||
cell: (info: any) => info.getValue()?.toFixed(2),
|
cell: (info: any) => info.getValue()?.toFixed(2),
|
||||||
meta: { headerClassName: 'min-w-[100px]' }
|
meta: { headerClassName: 'min-w-[100px]' }
|
||||||
},
|
},
|
||||||
@ -162,7 +162,7 @@ const ShowDetailWalletDialog = () => {
|
|||||||
limit,
|
limit,
|
||||||
page: page + 1,
|
page: page + 1,
|
||||||
with_deleted: false,
|
with_deleted: false,
|
||||||
order_field: sorting?.[0]?.id ?? 'amount',
|
order_field: sorting?.[0]?.id ?? 'created_at',
|
||||||
order_direction: sorting?.[0]?.desc ? 'ASC' : 'DESC',
|
order_direction: sorting?.[0]?.desc ? 'ASC' : 'DESC',
|
||||||
filter: JSON.stringify(filters)
|
filter: JSON.stringify(filters)
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ const ShowDetailWalletDialog = () => {
|
|||||||
limit: 10000,
|
limit: 10000,
|
||||||
page: 1,
|
page: 1,
|
||||||
with_deleted: false,
|
with_deleted: false,
|
||||||
order_field: 'amount',
|
order_field: 'created_at',
|
||||||
order_direction: 'DESC',
|
order_direction: 'DESC',
|
||||||
filter: JSON.stringify(filters)
|
filter: JSON.stringify(filters)
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@ const ShowDetailWalletDialog = () => {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
pagination={{ size: 5 }}
|
pagination={{ size: 5 }}
|
||||||
layout={{ card: true }}
|
layout={{ card: true }}
|
||||||
sorting={[{ id: 'amount', desc: false }]}
|
sorting={[{ id: 'created_at', desc: false }]}
|
||||||
serverSide={true}
|
serverSide={true}
|
||||||
onFetchData={({ pageIndex, pageSize, sorting, columnFilters }) =>
|
onFetchData={({ pageIndex, pageSize, sorting, columnFilters }) =>
|
||||||
getTransactionLists(pageIndex, pageSize, sorting, columnFilters)
|
getTransactionLists(pageIndex, pageSize, sorting, columnFilters)
|
||||||
|
|||||||
Reference in New Issue
Block a user