airajena opened a new pull request, #5337:
URL: https://github.com/apache/fineract/pull/5337
## Description
This PR implements the missing Note CRUD (Create, Read, Update, Delete)
functionality for `SHARE_ACCOUNT` and `SAVINGS_TRANSACTION` note types. The
existing implementation had TODO placeholders that were logging errors instead
of providing actual functionality.
## What's Changed
### NoteRepository.java
- Added [findBySavingsTransactionAndId(SavingsAccountTransaction,
Long)](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java:57:4-57:94)
query method
- Added [findByShareAccountAndId(ShareAccount,
Long)](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java:59:4-59:69)
query method
- Added
[findByShareAccount(ShareAccount)](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java:61:4-61:61)
for listing share account notes
### NoteWritePlatformServiceJpaRepositoryImpl.java
- Implemented
[createSavingsTransactionNote()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:186:4-203:5)
method for creating notes on savings transactions
- Implemented
[createShareAccountNote()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:207:4-221:5)
method for creating notes on share accounts
- Implemented
[updateSavingsTransactionNote()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:430:4-452:5)
method
- Implemented
[updateShareAccountNote()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:454:4-475:5)
method
- Updated
[getResourceUrlFromCommand()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:268:4-295:5)
to properly detect `SAVINGS_TRANSACTION` type when `subentityId` is present
alongside `savingsId`
- Replaced `log.error("TODO Implement getNoteForDelete for SHARE_ACCOUNT")`
with actual implementation
- Replaced `log.error("TODO Implement getNoteForDelete for
SAVINGS_TRANSACTION")` with actual implementation
- Updated
[createNote()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:221:4-254:5)
and
[updateNote()](cci:1://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java:477:4-510:5)
switch statements to handle new types
- Removed unused `@Slf4j` annotation after removing TODO log statements
### NoteAutoConfiguration.java
- Added `SavingsAccountTransactionRepository` dependency injection
- Added
[ShareAccountRepositoryWrapper](cci:2://file:///c:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepositoryWrapper.java:24:0-45:1)
dependency injection
## Related Issue
Fixes part of FINERACT-2421 (Minor bug-fixes and enhancements of 1.15.0)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]