ENCOA-66: Payment record not sorting
This commit is contained in:
@@ -788,10 +788,11 @@ export default function PaymentRecord() {
|
|||||||
const {rows: filteredRows, renderSearch} = useListSearch(paypalFilterRows, updatedPaypalPayments);
|
const {rows: filteredRows, renderSearch} = useListSearch(paypalFilterRows, updatedPaypalPayments);
|
||||||
|
|
||||||
const paypalTable = useReactTable({
|
const paypalTable = useReactTable({
|
||||||
data: filteredRows,
|
data: filteredRows.sort((a, b) => moment(b.createdAt).diff(moment(a.createdAt), "second")),
|
||||||
columns: paypalColumns,
|
columns: paypalColumns,
|
||||||
getCoreRowModel: getCoreRowModel(),
|
getCoreRowModel: getCoreRowModel(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const getUserModal = () => {
|
const getUserModal = () => {
|
||||||
if (user) {
|
if (user) {
|
||||||
if (selectedCorporateUser) {
|
if (selectedCorporateUser) {
|
||||||
@@ -888,7 +889,7 @@ export default function PaymentRecord() {
|
|||||||
const {rows: csvRows, columns: csvColumns} = getCSVData();
|
const {rows: csvRows, columns: csvColumns} = getCSVData();
|
||||||
|
|
||||||
const renderTable = (table: Table<any>) => (
|
const renderTable = (table: Table<any>) => (
|
||||||
<table className="rounded-xl bg-mti-purple-ultralight/40 w-full">
|
<table className="rounded-xl h-full bg-mti-purple-ultralight/40 w-full">
|
||||||
<thead>
|
<thead>
|
||||||
{table.getHeaderGroups().map((headerGroup) => (
|
{table.getHeaderGroups().map((headerGroup) => (
|
||||||
<tr key={headerGroup.id}>
|
<tr key={headerGroup.id}>
|
||||||
|
|||||||
Reference in New Issue
Block a user