diff --git a/src/views/Chores/MyChores.jsx b/src/views/Chores/MyChores.jsx index 5c1076f..fe94981 100644 --- a/src/views/Chores/MyChores.jsx +++ b/src/views/Chores/MyChores.jsx @@ -217,10 +217,14 @@ const MyChores = () => { return [] } - // If a custom filter (temp or saved) is active, use customFilteredChores + // Determine which chores to group based on active filter type let choresToGroup = chores if (tempFilter || activeFilterId) { + // Advanced/custom filter active choresToGroup = customFilteredChores + } else if (searchFilter !== 'All') { + // Quick filter active (Overdue, Due today, Label, Priority, etc.) + choresToGroup = filteredChores } else if (!selectedProject || selectedProject.id === 'default') { // No project selected or default project: only show tasks without a projectId choresToGroup = chores.filter(chore => !chore.projectId) @@ -240,9 +244,11 @@ const MyChores = () => { return sections }, [ chores, + filteredChores, customFilteredChores, tempFilter, activeFilterId, + searchFilter, selectedChoreSection, selectedChoreFilter, selectedProject, @@ -1290,7 +1296,7 @@ const MyChores = () => { )} )} - {(searchTerm?.length > 0 || searchFilter !== 'All' || activeFilterId) && + {searchTerm?.length > 0 && viewMode !== 'calendar' && ( { )} {searchTerm.length === 0 && - searchFilter === 'All' && - !activeFilterId && viewMode !== 'calendar' && ( {choreSections.map((section, index) => { diff --git a/src/views/Chores/SortAndGrouping.jsx b/src/views/Chores/SortAndGrouping.jsx index eeee5a1..608fa05 100644 --- a/src/views/Chores/SortAndGrouping.jsx +++ b/src/views/Chores/SortAndGrouping.jsx @@ -344,14 +344,14 @@ const SortAndGrouping = ({ sx={{ borderRadius: 'var(--joy-radius-sm)', backgroundColor: - selectedItem === item.name + selectedItem === item.value ? 'var(--joy-palette-primary-softBg)' : selectedIndex === index && anchorEl && isKeyboardNavigating ? 'var(--joy-palette-neutral-softHoverBg)' : 'transparent', '&:hover': { backgroundColor: - selectedItem === item.name + selectedItem === item.value ? 'var(--joy-palette-primary-softBg)' : 'var(--joy-palette-neutral-softHoverBg)', }, @@ -368,16 +368,16 @@ const SortAndGrouping = ({ {item.name} - {selectedItem === item.name && ( + {selectedItem === item.value && (