Commit Graph

148 Commits

Author SHA1 Message Date
7480aed4d1 refactor(entries-service): clean up unused imports and adjust isTurnierPublished visibility 2026-04-11 12:23:53 +02:00
0aa1a1b9b7 feat(entries+time-scheduling): add support for automatic breaks and inspection type configurations
- **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/`.
2026-04-11 12:21:42 +02:00
97ed8ad20a refactor(tests): clean up unused imports in EntriesIsolationIntegrationTest
Some checks are pending
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Waiting to run
2026-04-10 14:42:52 +02:00
1ba4845f6c feat(frontend+billing): integrate billing UI and navigation into Turnier module
- **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.
2026-04-10 14:30:54 +02:00
02c6da146e refactor(billing+entries): remove unused import and adjust tenant transaction signature 2026-04-10 12:57:30 +02:00
c1fadac944 feat(entries+billing): integrate automatic fee booking for entries with billing service
- **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.
2026-04-10 12:49:03 +02:00
eef17b3067 feat(billing): implement REST API, database config, and tests for billing service
- **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.
2026-04-10 12:27:02 +02:00
21f3a57e6e feat(billing): introduce billing domain and service infrastructure
- **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
2026-04-10 12:18:03 +02:00
e7d7e43ccf feat(domain+frontend): implement structured division warnings and enhance validation rules
- **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.
2026-04-10 11:37:34 +02:00
8726129b96 feat(core+frontend): add P2P sync infrastructure with WebSocket support
- **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.
2026-04-10 10:55:00 +02:00
363aa80fe4 feat(core+frontend+domain): add ZNS Bewerb parser and integrate start list feature
- **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.
2026-04-10 09:59:31 +02:00
c11bffef22 feat(docs+domain): refine event and tournament models, align with updated domain terminology
- **Documentation:**
  - Added `2026-04-09_Session_Log_Turnier_Veranstaltung_Domain_Alignment.md` to document validation and updates to `Veranstaltung` and `Turnier` domain models.
  - Updated `Overview.md` to reflect new terminology and added attributes for `Veranstaltung` (`Austragungsplätze`, `Artikel-Preisliste`) and `Turnier`
(`Turnierbeauftragter`, updated `Reglement`, `Nennschluss`, `Nachnenngebühr`, and `Nenntauschbörse`).

- **Domain Updates:**
  - Adjusted `Turnier` model: renamed `richterObmannId` → `turnierbeauftragterId`, added missing fields (`nennschluss`,
2026-04-09 10:09:21 +02:00
f8662e973e docs: add class diagram for core entities in C4 architecture
- 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.
2026-04-09 09:24:35 +02:00
6ba6192684 Rename DomBewerbTest to BewerbTest to align with updated domain model naming conventions. 2026-04-08 23:52:59 +02:00
ee520073f0 Standardize exception naming in VeranstaltungController: replace unused exception variable names with _ for cleaner and more concise code. 2026-04-08 23:01:18 +02:00
f2dff2a4d8 Remove Dom prefix from domain models: rename classes to reflect business terminology, update references in tests, repositories, and services; add ADR for new naming conventions. 2026-04-08 23:00:52 +02:00
e83b09fd63 Refactor events-service Gradle build: streamline plugin and dependency declarations, resolve naming inconsistencies, and update module references for improved maintainability. 2026-04-08 23:00:36 +02:00
5d1c89438c Migrate UUID handling in VeranstaltungRepositoryImpl: standardize conversion functions, update methods for entity mapping, and refactor queries for enhanced consistency and type safety. 2026-04-08 23:00:23 +02:00
84403287a1 Extend Bewerb table and add BewerbRichterEinsatz table: introduce new properties, indexes, and mappings to support richer domain model and scheduling capabilities. 2026-04-08 23:00:03 +02:00
e4f22096ed Extend Bewerb repository and service: add RichterEinsatz handling, enhance property mapping, and align DTOs with updated domain model. 2026-04-08 22:59:38 +02:00
8b6ea11d46 Extend Bewerb DTOs and APIs: add comprehensive properties, mapping functions, and RichterEinsatz support, and align backend and frontend implementations. 2026-04-08 22:59:26 +02:00
2d42578378 Remove Dom prefix from domain models: delete DomVeranstaltung, rename models like DomNennung to Nennung, update references in repositories, services, and tests for consistency. 2026-04-08 22:59:15 +02:00
085656a85b Extend Bewerb domain model: add new properties (e.g., Beschreibung, Aufgabe, BeginnZeitTyp), update Enums, and align repository structures. 2026-04-08 22:58:58 +02:00
d91d88855e Add Bewerb extensions and related infrastructure: introduce V5 and V6 migrations with new columns, constraints, indexes, and tables (e.g., Austragungsplatz, RichterEinsätze, TurnierArtikel) to support extended domain models and reporting capabilities. 2026-04-08 22:58:40 +02:00
da7afec9d7 Add domain models: Austragungsplatz, TurnierArtikel, and RichterEinsatz. 2026-04-08 22:58:26 +02:00
8bc6f8e1df Register events modules in Gradle build and refactor VeranstaltungController: remove unused use cases, streamline request handling, and improve error responses. 2026-04-08 22:56:21 +02:00
6b9177e818 feat(db+domain): add turniernummer and einschraenkungen fields for tournament scope and constraints
- **Database Changes:** Introduced `turnier_nummer` (mandatory, 5 digits) and `einschraenkungen` (mandatory, ÖTO-specific constraints) columns in `turniere` table. Seeded `turnier_nummer` with `oeps_turniernummer` where applicable.
- **Domain Models:** Extended `Turnier` and `DomTurnier` with `turnierNummer` and `einschraenkungen` fields. Added `TeilnehmerKreisE` enum for mapping restriction types.
- **Services and Controllers:** Updated repository and service operations to handle the new fields. Controllers reflect the new request models for creation and updates.
- **Validation:** Enforced input validation for `turnierNummer` format and `einschraenkungen` values.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
2026-04-07 15:07:25 +02:00
7bf89c58d3 Refactor license matrix and tokenizer logic: rename LicenseTable to LizenzTable, replace LicenseMatrixService with LizenzMatrixService, enhance tokenizer with normalized and fallback token handling, improve ZNS import for license extraction, and update related documentation.
Some checks are pending
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Waiting to run
2026-04-06 23:52:06 +02:00
b7fa2d26a9 Refactor domain models and repositories: align imports, improve formatting consistency, remove unused imports, and harmonize implementation for better ZNS import compatibility. 2026-04-06 19:57:43 +02:00
abaaeddaaf Standardize and refactor master data infrastructure: rename tables for plural consistency, remove unused entity tables, improve ZNS import mappings with enriched license properties, introduce Altersklasse domain model, activate Consul service discovery, and update application configuration accordingly. 2026-04-06 19:50:37 +02:00
bc13a58a14 Remove unused imports in BundeslandRepository and BundeslandExposedRepository. 2026-04-06 16:52:34 +02:00
1b6f8e7c59 Refactor BundeslandRepository, implement V012 migration for Reiter master data changes, harmonize domain models, resolve repository interface inconsistencies, and enhance ZNS import with relational mapping improvements. 2026-04-06 16:51:18 +02:00
0ae9a1f1b8 Refactor master data infrastructure to streamline Reiter and Bundesland relationships, add V012 migration, harmonize domain models, implement repository methods for enhanced ZNS import logic, and update associated tests. 2026-04-06 16:39:09 +02:00
1a6f2ea7ad Remove deprecated ZnsLegacyParsers, update MASTER_ROADMAP to reflect cleanup of parser remnants, stabilize ZNS import tests, and improve ZnsImportService with refined ZipInputStream management and enhanced functionary-reiter matching logic. 2026-04-06 14:41:50 +02:00
e219116609 Make V010 migration idempotent: wrap verein.name to verein_name column rename in a conditional DO block to avoid errors on existing schema. Update changelog. 2026-04-06 14:25:21 +02:00
9223305613 Adjust V011 migration: clarify redundant field removal in V010, ensure reiter_id addition and foreign key constraint establishment. Update changelog accordingly. 2026-04-06 14:23:09 +02:00
3cab4c4f47 Link Funktionaer to Reiter via reiter_id, implement findByName in ReiterRepository, optimize ZNS import for functionary-reiter matching, remove redundant fields from FunktionaerTable, and add database migration V011. 2026-04-06 14:21:11 +02:00
9237882437 Integrate qualification master data (QualifikationMasterTable) with functionary models, update schema and repository logic, refactor satzID references, and harmonize database migration (V010). 2026-04-06 13:59:14 +02:00
c35869f8ee Integrate qualification master data system (QualifikationMasterTable) for functionaries, refactor mapping logic in repositories, enhance database initialization for ZNS and Masterdata services, and add a seeder for ÖTO/FEI qualification data. Fix PSQLException during ZNS imports. 2026-04-06 13:53:15 +02:00
933ef9cd6c Resolve port conflicts in masterdata-service: update application.yml with separated bind addresses (Spring: 127.0.0.1, Ktor: 0.0.0.0), change management port to 8086, and add explicit datasource and Flyway configuration. Fix startup issues with Database.connect() in MasterdataDatabaseConfiguration. 2026-04-06 09:43:31 +02:00
aa9e2da3a3 Remove deprecated ZnsLegacyParsersTest.kt, synchronize database schema with Exposed domain models (migration V010), add license-related fields to Reiter, integrate updated LicenseMatrixService fallback logic, improve ZnsImportService with file archiving, and add ZNS testing runbook. 2026-04-06 01:46:26 +02:00
e94dc5a803 Introduce modular ZNS parsers (ZnsVereinParser, ZnsReiterParser, ZnsPferdParser, ZnsFunktionaerParser), replace legacy parsers, and update the import service/test suites to support streamlined parsing and isolated imports. Deprecate ZnsLegacyParsers. Add comprehensive tests (ZnsParserTest) and revise extraction logic for ZNS data. 2026-04-06 01:19:56 +02:00
f50d4deb16 Refactor domain models (DomFunktionaer, DomReiter, DomPferd) to align with ZNS conventions: simplify naming, update properties, and enhance parser logic. Adjust related controllers, repository methods, and tests. Update MASTER_ROADMAP with changes to domain models. 2026-04-06 00:00:23 +02:00
1e5fa3d053 Remove unused imports across multiple modules to streamline code and improve readability. 2026-04-05 08:23:04 +02:00
a61dda69d1 Refactor domain models (DomFunktionaer, DomReiter, DomPferd) for ZNS alignment: update properties, streamline validation logic, and enhance parser to support new format. Adjust controllers and repository methods accordingly. 2026-04-05 08:21:16 +02:00
35f8b46e6c Archive outdated journal logs and documents. Add Postman Runbook structure and centralize API testing documentation. Update Flyway configuration for ping-service with service-specific schema history. 2026-04-03 21:48:39 +02:00
b9ec070993 docs: log session outcomes and apply enhancements across multiple components
Some checks failed
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Has been cancelled
- **Docker Fixes:** Resolved failed builds for Gateway and Ping services by switching to `eclipse-temurin:21-jdk-alpine`, correcting Gradle configurations, and fixing cache mount paths.
- **ZNS-Import Consul Registration:** Enabled Consul service discovery by updating `application.yaml` and `build.gradle.kts`.
- **pgAdmin Provisioning:** Preconfigured the database server in `servers.json` and updated `dc-ops.yaml` for seamless setup.
- **Postman Documentation:** Added a detailed Postman test guide covering environment setup, endpoint groups, and recommended test sequences.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
2026-04-03 14:24:46 +02:00
59f7f8d4ad feat(tests): add QA test suites for onboarding and departmental logic validation
- **Onboarding (B-2):** Extracted `OnboardingValidator` and added `OnboardingValidatorTest` for edge-case validations (17 new unit tests: field guards, double-click prevention, cancel/reset behavior, `rememberSaveable` regression fix).
- **Departmental Logic (B-3):** Extended `AbteilungsRegelServiceTest` with 14 new tests covering CSN-C-NEU splitting logic (≤95 cm: license-free/licensed, ≥100 cm: R1/R2+), Caprilli regressions, and organizational/separate award scenarios.
- Updated `AbteilungsRegelService.kt` to implement CSN-C-NEU logic and added `ORGANISATORISCH` + `SEPARATE_SIEGEREHRUNG` enums for new rules.
- Updated Changelog and QA roadmap with completed tasks.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
2026-04-03 11:46:05 +02:00
c696b8c50e feat(db): add regulation-as-data tables for license height and horse age matrices
- Introduced `license_height_matrix` for mapping minimum license requirements to jump heights (ÖTO § 231).
- Added `horse_min_age_matrix` for defining minimum horse ages by discipline, height, or level (ÖTO § 103, FEI GR Art. 136).
- Populated both tables with ÖTO 2026 and FEI-compliant seed data.
- Updated Flyway V008 to remove incorrect `RD4` entry and annotated corrected enum references.
- Created Flyway V009 for introducing the new tables and their seeds.
- Aligned documentation, validation rules, and roadmaps for backend implementation handover.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
2026-04-03 11:10:45 +02:00
f4844eb428 fix(tests): resolve EntriesIsolationIntegrationTest failures with test-specific DB config
- Added `TestExposedConfiguration` to connect Exposed with Spring `DataSource` in the `test` profile.
- Downgraded `springdoc` version from `3.0.0` to `2.8.9` for Spring Boot 3.x compatibility.
- Applied `@ActiveProfiles("test")` to `EntriesIsolationIntegrationTest`.
- Updated roadmap documentation to reflect bugfix and test success.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
2026-04-03 10:24:08 +02:00