mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
no hidden (#5305)
This commit is contained in:
@@ -567,15 +567,21 @@ function OverbudgetedBanner({ month, onBudgetAction, ...props }) {
|
||||
);
|
||||
}
|
||||
|
||||
function OverspendingBanner({ month, onBudgetAction, ...props }) {
|
||||
function OverspendingBanner({ month, onBudgetAction, budgetType, ...props }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { list: categories, grouped: categoryGroups } = useCategories();
|
||||
const categoriesById = groupById(categories);
|
||||
const groupsById = groupById(categoryGroups);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const overspentCategories = useOverspentCategories({ month });
|
||||
const overspentCategories = useOverspentCategories({ month }).filter(c => {
|
||||
if (budgetType === 'tracking') {
|
||||
return !c.hidden && !groupsById[c.group].hidden;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
const categoryGroupsToShow = useMemo(
|
||||
() =>
|
||||
@@ -694,7 +700,11 @@ function Banners({ month, onBudgetAction }) {
|
||||
style={{ backgroundColor: theme.mobilePageBackground }}
|
||||
>
|
||||
<UncategorizedTransactionsBanner />
|
||||
<OverspendingBanner month={month} onBudgetAction={onBudgetAction} />
|
||||
<OverspendingBanner
|
||||
month={month}
|
||||
onBudgetAction={onBudgetAction}
|
||||
budgetType={budgetType}
|
||||
/>
|
||||
{budgetType === 'envelope' && (
|
||||
<OverbudgetedBanner month={month} onBudgetAction={onBudgetAction} />
|
||||
)}
|
||||
|
||||
6
upcoming-release-notes/5305.md
Normal file
6
upcoming-release-notes/5305.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [youngcw]
|
||||
---
|
||||
|
||||
Fix overspent categories banner including hidden categories in the tracking budget
|
||||
Reference in New Issue
Block a user