refactor: update operation and transaction mappers to use request DTOs and improve snapshot handling in tests#180
Merged
Conversation
…e entries and operations more effectively
…usecase feat: 142 refactor UpdateTransactionUseCase and EntryFactory to manage entries and operations more effectively
- Added `compareEntry` and `compareOperation` functions to handle comparison logic for entries and operations. - Created unit tests for both comparers to ensure correct behavior under various scenarios. - Updated `EntryFactory` to utilize the new comparers for updating entries in transactions. - Refactored entry and operation DTOs to include necessary fields for updates. - Modified repository interfaces and implementations to replace soft delete methods with void methods. - Updated transaction use case to handle entry updates more effectively. - Enhanced domain entities with new methods for updating descriptions and operations. - Adjusted tests across the application to reflect changes in entry and operation handling.
…updater for entry management
…ods for better clarity and functionality
…nction to support currency parameter
…lifying entry creation logic
…, enhance entry creation and update logic
…ty with improved metadata handling
…ged entries in EntryUpdater
…ance error handling
…during-updating-transaction Refactor entry and operation management with enhanced comparison logic
…nality and add tests for entry operations
…ith corresponding tests
…s in EntryRepository
…ositories-add-tests feat: 154 implement update and voidByIds methods in EntryRepository with corresponding tests
…estoration and persistence
- Commented out unused methods in OperationRepository for clarity. - Updated insert method in OperationRepository to handle multiple operations. - Implemented save method in OperationRepository to manage insertions and deletions. - Enhanced TransactionRepository to include entry and operation management. - Added transaction snapshot retrieval in TransactionRepository. - Removed unimplemented methods and added necessary comments for future implementation.
…nd context management
… transaction use cases
Enhance transaction handling and repository management
#162) * feat(database): add versioning to entries and transactions - Introduced a new version column to the entries and transactions tables in the database schema. - Updated the entry and transaction mappers to include the version field. - Modified the entry and transaction entities to manage version increments on updates. - Adjusted test cases to account for the new version field. - Enhanced the journal to track changes related to version updates. * Merge branch '144-refactoring-updatetransactionusecase' into 157-improve-transaction-updating * Refactor Entry and Transaction Domain Logic - Updated Entry creation to use userId instead of User object for better type handling. - Modified tests for Entry to reflect changes in user ownership representation. - Refactored Transaction entity to accept userId and updated related methods for entry management. - Introduced EntryDraft and EntryUpdate types for better clarity in transaction entry handling. - Enhanced transaction tests to validate entry management and updates. - Removed deprecated transaction tests and ensured new tests cover all functionalities. * feat(transaction): enhance transaction update logic and error handling * fix(entity): update timestamps handling in Operation, Transaction, and User classes * feat(transaction): add EntryDoesNotBelongToTransactionError and improve entry attachment validation
refactor: update repository interfaces and improve save methods with snapshots
…nusecase' into 164-update-entry-repository-tests
refactor(entry): streamline entry repository tests and enhance save logic
…ction handling in tests
…ry-tests refactor(operations): remove commented-out methods and improve transaction handling in tests
- Deleted EntriesService including EntryCreator, EntryUpdater, and EntryService classes. - Removed operation.factory.ts and its associated tests. - Updated Entry and TransactionBuilder to use TransactionBuildContext instead of EntryContext. - Cleaned up imports and adjusted related tests accordingly.
…elated types - Updated Transaction class to manage operations instead of entries. - Refactored methods for creating, attaching, updating, and deleting operations. - Adjusted TransactionSnapshot and related types to reflect operations structure. - Removed entry-related logic and tests, ensuring focus on operations. - Enhanced validation to ensure transaction balance based on operations.
…sistency - Updated OperationProps and UpdateOperationProps to streamline operation handling. - Refactored transaction entity tests to align with new operation structure. - Removed EntryRepository and related tests to simplify the codebase. - Adjusted transaction repository methods to accommodate new operation types. - Enhanced validation schemas for transactions and operations to ensure data integrity.
…s and improve snapshot handling in tests
…y associate operations, enhancing balance validation and simplifying schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.