Skip to content

This PR introduces multiple enhancements and refactorings in the expense module:#7

Open
sagarboyal wants to merge 103 commits into
AditShh-git:mainfrom
sagarboyal:main
Open

This PR introduces multiple enhancements and refactorings in the expense module:#7
sagarboyal wants to merge 103 commits into
AditShh-git:mainfrom
sagarboyal:main

Conversation

@sagarboyal
Copy link
Copy Markdown
Contributor

  • 🧹 Combined all individual PageResponse classes into one generic pagination handler.
  • 🔍 Added dynamic filtering in the Category module using Specifications.
  • 🔐 Implemented access denied handler for role-based access control.
  • 🧑‍💼 Added Admin Controller and integrated role-based operations.
  • ♻️ Refactored code for better readability and maintainability.
  • 🧪 Removed unused methods and imports to clean up the codebase.
  • ✏️ Integrated CREATE and UPDATE operations for expenses with validations.

Notes

  • Please review the new generic pagination and dynamic filtering logic carefully.
  • Ensure the access control works as expected for Admin and User roles.

Let me know if you want a shorter or more informal version, too!

sagarboyal added 30 commits May 17, 2025 20:40
adding expenses according to the user who has logged in!
and added ApiException for custom error handled message!
…deps!

updating expenses according to the user who has logged in!
and added MethodArgumentException for custom validation thrown from ExpenseDTO!
-> added authUtil for repetitive @AuthenticationPrinciple.
-> Rename Expense and Category Response to PagedResponse!
-> Added ExpenseResponse for efficient data retrieval.
-> new field added status and message!
-> remove status form user!
-> added authUtil for repetitive @AuthenticationPrinciple.
-> Rename Expense and Category Response to PagedResponse!
-> Added ExpenseResponse for efficient data retrieval.
-> new field added status and message!
-> remove status form user!
-> added ApprovalRequest, ExpenseUpdateRequest, UserUtils.
-> added approve expense based on user logged in!
-> added new default login info for employer and manager!
-> added Admin Controller for admin related stuff!
-> added ExpenseSpecification for dynamic filter!
-> updated some path!
-> register user functionality updated through payload
-> add to track total spend in expenses added a query in ExpenseRepository
-> Updated User Update Methods for email and fullName or PassWord Change!
-> added an endpoint for handling promotion and demotion roles which can access only admins!
-> added end point that returns loggedIn user Profile!
-> added dynamic filtering in audit-log!
-> added pagination also!
-> removed unused imports!
-> cors config added!
-> in token roles also assigned!
- Added ContactRequest entity and repository
- Implemented service for saving and retrieving contact requests
- Exposed REST endpoint for submitting contact requests
- Timestamp autopopulated on creation
…ashboard analytics, and add docker compose for postgres/pgadmin

- restructure packages into catalog, expense, identity, notification, shared, and support modules
- move analytics into a dedicated expense dashboard section with its own service/controller
- keep dashboard endpoints compatible via /api/dashboard and existing /api/analytics paths
- add docker compose for postgres and pgadmin
- update docker/docs for local development
…equest context issues

- Publish domain events via ApplicationEventPublisher instead of calling UserEventListener directly to ensure @async and @TransactionalEventListener proxy behavior is respected.
- Add @JsonManagedReference/@JsonBackReference on User <-> PersonalUser and User <-> BusinessUser to break infinite recursion during serialization.
- Replace raw User entity serialization in event listener  with a safe flat snapshot map to avoid bidirectional JPA relation loops.
- Capture client IP on the request thread before async handoff by injecting.
- Add clientIp field to UserCreatedEvent and OAuthUserCreatedEvent records.
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.

1 participant