“Error ‘Something Went Wrong’ When Selecting Any Value from Category Dropdown in Dashboard > Monthly Expense Card”

This commit is contained in:
Kartik Sharma 2025-11-07 10:16:23 +05:30
parent f69faccd62
commit 63392ebde8

View File

@ -35,7 +35,7 @@ const ExpenseByProject = () => {
const getSelectedTypeName = () => { const getSelectedTypeName = () => {
if (!selectedType) return "All Types"; if (!selectedType) return "All Types";
const found = ExpenseTypes.find((t) => t.id === selectedType); const found = ExpenseCategories.find((t) => t.id === selectedType);
return found ? found.name : "All Types"; return found ? found.name : "All Types";
}; };
@ -69,8 +69,8 @@ const ExpenseByProject = () => {
const ExpenseCategoryType = [ const ExpenseCategoryType = [
{id:1,category:"Category",label:"Category"}, { id: 1, category: "Category", label: "Category" },
{id:2,category:"Project",label:"Project"} { id: 2, category: "Project", label: "Project" }
] ]
return ( return (
@ -92,7 +92,7 @@ const ExpenseByProject = () => {
{viewMode} {viewMode}
</button> </button>
<ul className="dropdown-menu dropdown-menu-end "> <ul className="dropdown-menu dropdown-menu-end ">
{ExpenseCategoryType.map((cat)=>( {ExpenseCategoryType.map((cat) => (
<li> <li>
<button <button
className="dropdown-item" className="dropdown-item"