sorted group by options

This commit is contained in:
pramod mahajan 2025-08-06 11:32:47 +05:30
parent db65526f6f
commit e249c1f64d
2 changed files with 7 additions and 4 deletions

View File

@ -20,15 +20,18 @@ const ExpenseFilterPanel = ({ onApply, handleGroupBy }) => {
const selectedProjectId = useSelector((store) => store.localVariables.projectId);
const { data, isLoading,isError,error,isFetching , isFetched} = useExpenseFilter();
const groupByList = useMemo(() => [
const groupByList = useMemo(() => {
return [
{ id: "transactionDate", name: "Transaction Date" },
{ id: "status", name: "Status" },
{ id: "submittedBy", name: "Submitted By" },
{ id: "project", name: "Project" },
{ id: "paymentMode", name: "Payment Mode" },
{ id: "expensesType", name: "Expense Type" },
{id: "createdAt",name:"Submitted Date"}
], []);
{ id: "createdAt", name: "Submitted Date" }
].sort((a, b) => a.name.localeCompare(b.name));
}, []);
const [selectedGroup, setSelectedGroup] = useState(groupByList[0]);
const [resetKey, setResetKey] = useState(0);

View File

@ -20,7 +20,7 @@ const ExpenseStatusLogs = ({ data }) => {
{logsToShow.map((log, index) => (
<div
key={log.id}
className="col-12 d-flex align-items-start mb-2"
className="col-12 d-flex align-items-start mb-1"
>
<Avatar
size="xs"