mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 10:14:53 -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 { t } = useTranslation();
|
||||||
|
|
||||||
const { list: categories, grouped: categoryGroups } = useCategories();
|
const { list: categories, grouped: categoryGroups } = useCategories();
|
||||||
const categoriesById = groupById(categories);
|
const categoriesById = groupById(categories);
|
||||||
|
const groupsById = groupById(categoryGroups);
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
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(
|
const categoryGroupsToShow = useMemo(
|
||||||
() =>
|
() =>
|
||||||
@@ -694,7 +700,11 @@ function Banners({ month, onBudgetAction }) {
|
|||||||
style={{ backgroundColor: theme.mobilePageBackground }}
|
style={{ backgroundColor: theme.mobilePageBackground }}
|
||||||
>
|
>
|
||||||
<UncategorizedTransactionsBanner />
|
<UncategorizedTransactionsBanner />
|
||||||
<OverspendingBanner month={month} onBudgetAction={onBudgetAction} />
|
<OverspendingBanner
|
||||||
|
month={month}
|
||||||
|
onBudgetAction={onBudgetAction}
|
||||||
|
budgetType={budgetType}
|
||||||
|
/>
|
||||||
{budgetType === 'envelope' && (
|
{budgetType === 'envelope' && (
|
||||||
<OverbudgetedBanner month={month} onBudgetAction={onBudgetAction} />
|
<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