- Added `Tagesabschluss` entity and repository to handle daily cash closing logic.
- Introduced cancellation logic for `Buchung`, enabling creation of offsetting entries.
- Extended schema definitions with `TagesabschlussTable` and nullable `storniertBuchungId` in `BuchungTable`.
- Updated services to support `Tagesabschluss` creation and `Buchung` cancellation.
- Implemented tests for `TagesabschlussService` and cancellation functionality.
- Updated documentation to reflect completed roadmap items related to cash management.
- Replaced hardcoded schema names with constants (`TEST_SCHEMA`, `CONTROL_SCHEMA`) across multiple tests.
- Resolved IDE warnings by removing unused variables (`result`), suppressing `SqlResolve`, and using ASCII-compliant strings.
- Corrected typos in test data (`testdb` -> `test_db`, `Produktions` -> `Production`).
- Improved readability and maintainability in migration and tenant registry tests by introducing companion object constants.
- Improved schema isolation logic with constants for tenant schemas and search path management in PostgreSQL.
- Added `withTenant` utility in `TenantContextHolder` to simplify tenant context usage.
- Removed unused imports, variables, and helper functions (`random()` and redundant `NennungRepository` references).
- Included missing `multitenancy.*` configuration keys in `additional-spring-configuration-metadata.json` to address IDE warnings.
- Fixed schema isolation handling in Exposed by switching table creation to JDBC and explicitly setting `search_path` in PostgreSQL.
- Removed redundant `runBlocking` calls, unused variables, and IDE warnings in the test.
- Added `JwtDecoder` mock in `@TestConfiguration` to prevent application context loading errors.
- Verified that writes in one tenant schema are no longer visible in another.
chore(config): add `application-test.yaml` for better test environment setup
- Configured H2 as an in-memory database for tests.
- Disabled Flyway and Consul to avoid unnecessary dependencies during testing.
- Removed `AbteilungViewModel`, `BewerbAnlegenViewModel`, `BewerbViewModel`, and `CreateBewerbWizardScreen`.
- Cleaned up related imports and unused domain models.
- **Domain Enhancements:**
- Introduced `PausenKonfiguration` and `BesichtigungsBlock` entities to handle automatic breaks and inspection scheduling.
- Added `BesichtigungsTypE` enum for inspection types (`ZU_FUSS`, `ZU_PFERD`).
- Updated `Bewerb` and `Abteilung` models to include pause and inspection type fields.
- **Service Updates:**
- Enhanced `StartlistenService` to calculate start times, accounting for breaks and inspection buffers.
- Extended `BewerbService` to support patchable time scheduling via new `updateZeitplan` API.
- **Persistence Changes:**
- Updated tables (`BewerbTable`, `AbteilungTable`) to persist break configurations and inspection types.
- Implemented repository mappings to include these new fields.
- **Testing:**
- Introduced `BewerbeZeitplanIntegrationTest` to validate new scheduling behaviors, including automatic pauses and inspection handling.
- **Documentation:**
- Added rulebook and conceptual documents for inspection and scheduling logic in `docs/01_Architecture/`.
- **Navigation Updates:**
- Added `AppScreen.Billing` route for participant billing linked to an event and tournament.
- **UI Additions:**
- Introduced `BillingScreen` and `BillingViewModel` for participant account management and manual transactions.
- Updated `TurnierAbrechnungTab` to include `BillingScreen` and enable account interaction.
- **Turnier Enhancements:**
- Enhanced `NennungenTabContent` to support navigation to billing via a new interaction.
- Added billing feature as a dependency to `turnier-feature`.
- **Billing Domain:**
- Extended `Money` to include subtraction operation and improved formatting for negative amounts.
- Added DTOs (`TeilnehmerKontoDto`, `BuchungDto`, `BuchungRequest`) for seamless data exchange with backend.
- **Test Improvements:**
- Updated `PreviewTurnierAbrechnungTab` to include interactive billing placeholder.
- **Misc Updates:**
- Enhanced breadcrumb navigation for billing in `DesktopMainLayout` for better user experience.
- **Entries-Service Updates:**
- Implemented automatic booking of fees (entry fees and late fees) during entry submission using `TeilnehmerKontoService`.
- Enhanced `Bewerb` entity with financial fields (`nenngeldCent`, `nachnenngebuehrCent`).
- Added Flyway migration to update `bewerbe` table with new financial fields.
- Updated `EntriesServiceApplication` to include billing package scanning for integration.
- **Billing-Service Enhancements:**
- Adjusted `TeilnehmerKontoService` to support fetching accounts by event and person.
- Improved database configuration to handle missing JDBC URLs during tests.
- **Tests:**
- Added integration tests to validate fee booking logic for entries, including late fee scenarios.
- Introduced H2 database setup for test isolation.
- **Misc:**
- Updated tenant-aware transactions to support H2 and PostgreSQL dialects.
- Adjusted log and error handling for robust integration between services.
- **REST API:** Added `BillingController` with endpoints for managing participant accounts and transactions, including history retrieval.
- **Database Configuration:** Introduced `BillingDatabaseConfiguration` to initialize database schema using Exposed.
- **Testing:** Added integration tests for `TeilnehmerKontoService` using H2 in-memory database.
- **Billing Domain:**
- Added Kotlin Multiplatform project with domain models (`TeilnehmerKonto`, `Buchung`, `BuchungsTyp`) to represent billing entities.
- Defined serialization strategies using `InstantSerializer`.
- **Service Implementation:**
- Introduced `BillingServiceApplication` as the main entry point for the billing service.
- Developed `TeilnehmerKontoService` for account management and transactions.
- **Persistence Layer:**
- Implemented Exposed repositories (`ExposedTeilnehmerKontoRepository`, `ExposedBillingRepositories`) for database interaction.
- Added table definitions (`TeilnehmerKontoTable`, `BuchungTable`) with indexes for efficient querying.
- **Build Configuration:**
- Setup Gradle build files for billing domain and service modules with dependencies for Kotlin, Serialization, Spring Boot, and Exposed.
- **Test Additions:**
- Extended ZNS importer tests with new scenarios for qualification parsing
- **Domain Updates:**
- Introduced `AbteilungsWarnung` entity for structured warning handling compliant with ÖTO § 39.
- Added validation rules for mandatory and optional division thresholds and structural completeness.
- Implemented `CompetitionWarningService` and `AbteilungsRegelService` for domain-centric validations.
- Updated domain models (`Bewerb`, `Abteilung`) to reflect structured warning logic.
- **Services:**
- Expanded `BewerbService` to include warning validation through `CompetitionWarningService`.
- **Frontend Enhancements:**
- Updated `TurnierBewerbeTab` to display warnings using tooltips with clear descriptions and structured formatting.
- Modified `BewerbUiModel` to handle warnings and integrate them into the UI.
- **Persistence:**
- Implemented `CompetitionRepositoryImpl` to map database rows to the new domain models and validation logic.
- **Testing:**
- Added comprehensive unit tests for `validateStrukturellesTeilung` and division-specific warnings.
- Enhanced existing tests to validate the new warning structure and code-based assertions.
- **Docs:**
- Updated roadmap to reflect the completion of structural warnings implementation.
- **Core Updates:**
- Implemented `P2pSyncService` interface with platform-specific WebSocket implementations (`JvmP2pSyncService` and no-op for JS).
- Developed `SyncEvent` sealed class hierarchy to handle peer synchronization events (e.g., `PingEvent`, `PongEvent`, `DataChangedEvent`, etc.).
- **Frontend Integration:**
- Introduced `SyncManager` to manage peer discovery and synchronization, coupled with `NetworkDiscoveryService`.
- Updated dependency injection to include `syncModule` for platform-specific sync service initialization.
- Enhanced `BewerbViewModel` to support new sync capabilities, including observing sync events and UI updates for connected peers.
- **Backend Enhancements:**
- Added ZNS-specific fields (`zns_nummer`, `zns_abteilung`) to Bewerb table for idempotent imports.
- Introduced import ZNS logic to handle duplicates and align with SyncManager updates.
- **UI Improvements:**
- Enhanced `TurnierBewerbeTab` with updated dialogs (ZNS imports, sync status) and dynamic previews.
- Improved network syncing feedback and error handling in frontend components.
- **DB Changes:**
- Added migration for new column fields in the Bewerb table with relevant indexing for ZNS import optimizations.
- **Parser Implementation:**
- Introduced `ZnsBewerbParser` to parse n2-XXXXX.dat files and map B-Satz lines to the `ZnsBewerb` domain model.
- Added test coverage for parsing B-Satz lines and edge cases in `ZnsParserTest`.
- **Frontend Integration:**
- Integrated ZNS import functionality into the `BewerbeTabContent` for uploading and previewing Bewerb data before import.
- Enhanced `BewerbViewModel` with state and intents for managing ZNS import, preview dialogs, and import confirmation.
- Supported start list generation and added modal for previewing generated start lists.
- **Domain Services:**
- Implemented `StartlistenService` to generate and calculate start times for start lists with respect to participant preferences.
- Added extensive test coverage in `StartlistenServiceTest` to validate sorting, preferences, and time calculations.
- **UI Enhancements:**
- Updated `Bewerbe` tab layout with search, filtering, and action buttons for ZNS import and start list generation.
- Introduced dialogs for ZNS import previews and start list previews.
- Created `class_diagram_core.drawio` to visualize core domain entities (`Veranstaltung`, `Platz`, `Turnier`, etc.).
- Included relationships and associations between entities such as 1:N and reference mappings.
- Structured diagram to align with Clean Architecture principles for better domain comprehension.