Skip to content
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

Feature/#301 modify project detail page #317

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

alcaron7
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization

Description

Added a new feature to display the most recent transactions on the dashboard of a project. This includes:

  • New TransactionsController in the backend that combines incomes and expenses data
  • API endpoint that returns the latest X transactions, sorted by date
  • Frontend table component to display these transactions
  • Type indicator to differentiate between income and expense entries

Related Tickets & Documents

- Add TransactionsController to merge incomes and expenses data
- Implement GetLatestTransactions endpoint to fetch last 5 transactions
- Add transactions table component to frontend dashboard
- Display combined income/expense transactions with type indicator
Copy link
Owner

@FelipePSoares FelipePSoares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alcaron7,

I added some comments and suggestions, please let me know if you need some help or explanation about anything.

Thank for your work, really nice work.

alcaron7 and others added 12 commits January 22, 2025 19:42
…ail-project.component.ts

Co-authored-by: Felipe Soares <[email protected]>
…ail-project.component.ts

Co-authored-by: Felipe Soares <[email protected]>
@alcaron7
Copy link
Contributor Author

alcaron7 commented Jan 23, 2025

@FelipePSoares

Great suggestions that I applied. Did some changes to finish the DTO mapping.

Copy link
Owner

@FelipePSoares FelipePSoares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking to the errors and thinking now and maybe should be a great thing instead make 2 calls to the database inexpenseItemService and IncomeService just create a method in the ProjectService getting all the data once. Than you don't need to call GetLatestAsync from income and expense, just call from project and use it.

What do you think?

alcaron7 and others added 3 commits January 23, 2025 05:57
@alcaron7
Copy link
Contributor Author

I think it's better to keep it the way you have it. The separation gives us more flexibility to handle specific logic for each type, makes the code more maintainable, and follows single responsibility principle. It also keeps the functions reusable when we need only income or only expense data. While one database call would be more efficient, the current architecture benefits outweigh this small performance difference.​​​​​​​​​​​​​​​​

@FelipePSoares
Copy link
Owner

FelipePSoares commented Jan 23, 2025

I think it's better to keep it the way you have it. The separation gives us more flexibility to handle specific logic for each type, makes the code more maintainable, and follows single responsibility principle. It also keeps the functions reusable when we need only income or only expense data. While one database call would be more efficient, the current architecture benefits outweigh this small performance difference.​​​​​​​​​​​​​​​​

Nice point, ok, we can keep as is, do you need some help to solve these building problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Frontend] Modify project detail page
2 participants