feat: Allow creating budgets up to 2 years ahead#925
feat: Allow creating budgets up to 2 years ahead#925grrtt49 wants to merge 1 commit intowe-promise:mainfrom
Conversation
📝 WalkthroughWalkthroughThe changes refactor budget date validation logic in the Budget model by introducing a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Usability-wise: how does this work when the user changes their mind and wants to start spending more/less on a category? I'm guessing this is one of the reasons it was left the way it is. 🤔 |
As I ponder that use case, would say my expectation is that the budget for all future months should be updated to reflect the new numbers EXCEPT in those places where edits had already been made. That's the "corner case" where things get interesting. |
Right now, it works just like any other month in the past/current. You can choose to create a budget for that month, if you do, you are able to set how much expected income and budgeted spending you want, then you can set the amounts for each category. They are initialized at 0 for each, just as it would be for any past/current month. And after creation, the numbers for each month are able to be edited like any past/current month. |
|
@jjmata Could you let me know if this makes sense, or is there anything I'm not understanding? |
Summary
This PR updates the budget date constraint so users can create budgets for future periods (up to 2 years ahead), instead of being limited to the current month. Closes #270)
What changed
Why
Users commonly plan budgets ahead of time; restricting creation to only the current month blocks forward planning.
Summary by CodeRabbit
Refactor
Tests