feat(Localization): enhance localization for tournament statistics and UI components
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s

- Added new localization keys for tournament statistics panels across multiple languages, improving user accessibility.
- Updated the TournamentsScreen in the mobile app to include a search feature and display internal tournament statistics.
- Enhanced the Tournaments API to support fetching internal tournament statistics, providing detailed insights for users.
- Improved UI components for better organization and interaction within the tournaments section, enhancing overall user experience.
This commit is contained in:
Torsten Schulz (local)
2026-05-14 16:25:16 +02:00
parent 6ef1d79a5f
commit 3d1dfe9a4c
17 changed files with 660 additions and 55 deletions

View File

@@ -2,6 +2,7 @@ package de.tt_tagebuch.shared.api
import de.tt_tagebuch.shared.api.http.AuthedHttpClient
import de.tt_tagebuch.shared.api.models.InternalTournamentDetailDto
import de.tt_tagebuch.shared.api.models.InternalTournamentStatsDto
import de.tt_tagebuch.shared.api.models.InternalTournamentSummaryDto
import io.ktor.client.call.body
import io.ktor.client.request.get
@@ -20,4 +21,15 @@ class TournamentsApi(
suspend fun getTournament(clubId: Int, tournamentId: Int): InternalTournamentDetailDto {
return client.http.get("/api/tournament/$clubId/$tournamentId").body()
}
suspend fun getInternalTournamentStats(
clubId: Int,
months: Int,
ageClassKeys: String?,
): InternalTournamentStatsDto {
return client.http.get("/api/tournament/internal-stats/$clubId") {
parameter("months", months)
ageClassKeys?.let { parameter("ageClassKeys", it) }
}.body()
}
}

View File

@@ -33,6 +33,36 @@ data class InternalTournamentDetailDto(
val bestOfEndroundSize: Int? = null,
)
@Serializable
data class InternalTournamentStatsAgeOption(
val key: String,
val band: String? = null,
val bandNum: Int? = null,
val genderMode: String? = null,
@Serializable(with = FlexibleNullableBooleanSerializer::class)
val isNoClass: Boolean? = null,
)
@Serializable
data class InternalTournamentStatsRow(
val memberId: Int = 0,
val firstName: String? = null,
val lastName: String? = null,
val totalPoints: Double? = null,
val tournamentCount: Int? = null,
val averagePoints: Double? = null,
)
@Serializable
data class InternalTournamentStatsDto(
val months: Int? = null,
val fromDate: String? = null,
val tournamentCount: Int = 0,
val ageClassOptions: List<InternalTournamentStatsAgeOption> = emptyList(),
val absoluteRanking: List<InternalTournamentStatsRow> = emptyList(),
val averageRanking: List<InternalTournamentStatsRow> = emptyList(),
)
@Serializable
data class OfficialTournamentListRowDto(
val id: Int = 0,