-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2955: ✨ Added total spending and revenue in category summar… #2982
Conversation
thanks @balaji119 for the PR and welcome! Instead of an observable, wouldn't it be easier to just make two calculated properties here, and then bind them to a template in the xaml with something like this?
The template would be easy translatable and the calculated properties could be unit tested. Those two things are possible with the current solution, but more difficult I would think. Or is there a special purpose to the Observable Object I overlook? |
@NPadrutt, if we keep it as a simple calculated property then when the filter is updated with a different date range then the updated values will not reflect in the UI. |
Instead of assigning the value directly, you could just call RaisePropeetyChanged(nameof(yourProperty)) when the data is reloaded to update the bindings and recalculate the value. |
… and income properties in categorySummary
@NPadrutt what you mentioned is the simple and right way to do it and made the change. You can review it? And I have added unit tests too, but I don't feel that's the right way to do it. Could you help me out here? |
Src/MoneyFox.Ui/Views/Statistics/CategorySummary/StatisticCategorySummaryViewModel.cs
Outdated
Show resolved
Hide resolved
Src/MoneyFox.Ui/Views/Statistics/CategorySummary/StatisticCategorySummaryViewModel.cs
Outdated
Show resolved
Hide resolved
Src/MoneyFox.Ui/Views/Statistics/CategorySummary/StatisticCategorySummaryPage.xaml
Outdated
Show resolved
Hide resolved
Src/MoneyFox.Ui.Tests/Views/Statistics/StatisticCategorySummaryViewModelTest.cs
Show resolved
Hide resolved
@NPadrutt Can you review again now? |
Src/MoneyFox.Ui.Tests/Views/Statistics/StatisticCategorySummaryViewModelTest.cs
Outdated
Show resolved
Hide resolved
@balaji119 I left you one suggestions. Other than that it looks good to me :) |
thanks @balaji119 |
fix #2955 |
…y page
Issue: #2955
PR Type
What kind of change does this PR introduce?
Feature
What is the current behavior?
Category summary page does not show total spending and total income
What is the new behavior?
Category summary page shows total spending and total income
PR Checklist
Please check if your PR fulfills the following requirements:
I have not tested on Windows as I am facing the following error
EP0700: Registration of the app failed. [0x80073CF0] error 0x80070003: Opening file from location: AppxManifest.xml failed with error: The system cannot find the path specified.
Other information