fix(dashboard): fix budget section category colors and spending calcu… - #531
Merged
lucaantonelli merged 1 commit intoJul 26, 2026
Merged
Conversation
…lation - Replace monthlyBudgetsStatsProvider with budgetsProvider + monthlyTransactionsProvider + allParentCategoriesProvider - Fix category colors using category.color index instead of cycling by list position - Include child-category transactions in spending aggregation via categoryParent - Simplify spent calculation by removing num.parse/toCurrency round-trip - Replace ternaries with min/max and add division-by-zero guard on perc
mikev-cw
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Description
The dashboard's budget section was displaying incorrect category colors and missing spending from child categories. This PR fixes both issues by replacing the pre-computed
monthlyBudgetsStatsProviderwith direct use ofbudgetsProvider,monthlyTransactionsProvider, andallParentCategoriesProvider, moving the spending calculation to the widget layer for more accurate and transparent logic.Closes: N/A
📱 Changes
category.colorindex instead of cycling by list positioncategoryParentnum.parse/toCurrencyround-trip in spending calculationmin/maxforamountandpercamountLimitis0🧪 Testing Instructions
Behaviour
📸 Screenshots / Screen Recordings (if applicable)
If your PR involves UI changes, please add screenshots or screen recordings here.
🔍 Checklist for reviewers