Payment Pending List — “Submitted By” Filter Not Sorted Alphabetically

This commit is contained in:
Kartik Sharma 2025-11-07 11:55:00 +05:30 committed by pramod.mahajan
parent 8f83d91d25
commit 03207a3318

View File

@ -180,9 +180,14 @@ const PaymentRequestList = ({ filters, groupBy = "submittedBy", search }) => {
];
if (isLoading) return <ExpenseTableSkeleton headers={header} />;
const grouped = groupBy
? groupByField(data?.data ?? [], groupBy)
const grouped = groupBy
? Object.fromEntries(
Object.entries(groupByField(data?.data ?? [], groupBy)).sort(([keyA], [keyB]) =>
keyA.localeCompare(keyB)
)
)
: { All: data?.data ?? [] };
const IsGroupedByDate = [
{ key: "transactionDate", displayField: "Transaction Date" },
{ key: "createdAt", displayField: "created Date" },