From ca969cc61bd6247237a68eaad22cc75779613fd5 Mon Sep 17 00:00:00 2001 From: youngcw Date: Tue, 8 Jul 2025 10:29:19 -0700 Subject: [PATCH] no hidden (#5305) --- .../src/components/mobile/budget/BudgetTable.jsx | 16 +++++++++++++--- upcoming-release-notes/5305.md | 6 ++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 upcoming-release-notes/5305.md diff --git a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx index e7a4e81f85..1a01a57a2b 100644 --- a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx +++ b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx @@ -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 }} > - + {budgetType === 'envelope' && ( )} diff --git a/upcoming-release-notes/5305.md b/upcoming-release-notes/5305.md new file mode 100644 index 0000000000..2c5ace7637 --- /dev/null +++ b/upcoming-release-notes/5305.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [youngcw] +--- + +Fix overspent categories banner including hidden categories in the tracking budget