chore: implementiere Suche nach Veranstalter via OEPS-Nummer, verbessere UI-Flow im Veranstaltungs-Wizard und erweitere VereinRepository um OEPS-Abfrage
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
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
Signed-off-by: StefanMoCoAt <stefan.mo.co@gmail.com>
This commit is contained in:
+4
@@ -26,6 +26,10 @@ class FakeVereinRepository : VereinRepository {
|
||||
|
||||
override suspend fun getVereine(): Result<List<Verein>> = Result.success(vereine.toList())
|
||||
|
||||
override suspend fun findByOepsNr(oepsNr: String): Verein? {
|
||||
return vereine.find { it.oepsNr == oepsNr }
|
||||
}
|
||||
|
||||
override suspend fun saveVerein(verein: Verein): Result<Verein> {
|
||||
val index = vereine.indexOfFirst { it.id == verein.id }
|
||||
if (index >= 0) {
|
||||
|
||||
+11
@@ -41,6 +41,17 @@ class KtorVereinRepository(
|
||||
} else emptyList()
|
||||
}
|
||||
|
||||
override suspend fun findByOepsNr(oepsNr: String): Verein? {
|
||||
return runCatching {
|
||||
val response = client.get("${ApiRoutes.Masterdata.VEREINE}/search") {
|
||||
parameter("oepsNr", oepsNr)
|
||||
}
|
||||
if (response.status.isSuccess()) {
|
||||
response.body<VereinDto>().toDomain()
|
||||
} else null
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
override suspend fun saveVerein(verein: Verein): Result<Verein> = runCatching {
|
||||
if (verein.id.isBlank() || verein.id.startsWith("new_")) {
|
||||
val request = VereinCreateRequest(
|
||||
|
||||
Reference in New Issue
Block a user