Add Goal Feature#79
Conversation
|
Requesting review from @EverStarck who has experience with the following files modified in this PR:
|
|
@tembo i don't want to expenses to modify the goals. ONLY EXPENSES AND TRANSFERS can change the goal progress. Remove everything related to expenses |
I've removed income's ability to modify goal progress as requested. Only expenses and transfers can now affect goal amounts. The changes include:
All goal progress updates now come exclusively from expenses and transfers, as specified. Let me know if you need any adjustments to these changes. |
|
@tembo i messed up. ONLY INCOMES and TRANSFERS can change the goal progress. Remove everything related to expenses and add incomes functionality |
@EverStarck I've made the requested changes to the goal tracking functionality. As requested, I've removed the expense relationship with goals and added income functionality instead. Here's what was done:
Now only incomes and transfers can contribute to goal progress as specified. |
|
@tembo remove all migrations you did |
@EverStarck I've removed all migration files as requested. The following files have been deleted:
I'll work on a cleaner approach for implementing the goal feature with a single migration file. |
|
@tembo on doing a update goal, it must check if the status changed, for example, if i update the current_amount, target_amount, deadline or something else, its possible the status is not the same. help me to add the logic |
Thanks for your feedback @EverStarck. I've implemented the goal status checking logic as requested. The changes include:
This ensures goal status always reflects the current state of progress and timeline, regardless of which fields are being updated. |
|
@tembo when updating an income or transfer, I should be able to update the goal, if I reduce the amount or delete the income/transfer, is probably the goal is not more completed. same if I add to the amount of the transaction |
Thank you for the feedback, @EverStarck. I've implemented goal recalculation when updating or deleting incomes and transfers. When you modify a transaction linked to a goal, the system now:
These changes ensure your goal progress remains accurate even after modifying or deleting transactions that contribute to it. |
|
@tembo also check the api_v1 endpoints income and transfer, i think you're duplicating code |
Thanks @EverStarck for pointing out the duplicate code. I've refactored the date filtering logic across the income, transfer, and expense endpoints by extracting the common functionality into a reusable helper function in the deps.py file. The changes include:
Let me know if you'd like any other improvements to the implementation. |
|
@tembo no mf, the api_v1 endpoints income and transfer ABOUT THE GOAL THING IN UPDATE/DELETE A INCOME OR TRANSFER. YOU ALREADY DID SOMETHING IN THE CRUD, BUT THE ENDPOINT ALREADY HAS SOME LOGIC, YOU'RE DUPLICATING THINGS |
Thanks for your feedback @EverStarck. I've refactored the income and transfer endpoints to eliminate the duplicated logic by moving it to the CRUD layer. The endpoints now call owner-aware methods like |
Description
Implement goal tracking feature with financial milestones and progress tracking.
Changes