chore: erweitere Datenmodelle um Nation und Bundesland, verbessere UI im Profil- und Veranstaltungs-Wizard

Signed-off-by: StefanMoCoAt <stefan.mo.co@gmail.com>
This commit is contained in:
2026-04-21 13:56:04 +02:00
parent 2662d4e82e
commit f13c2eb35b
8 changed files with 45 additions and 12 deletions
@@ -429,14 +429,14 @@ private fun TurnierAnlageStep(viewModel: VeranstaltungWizardViewModel) {
Text("Schritt 5: Turniere & Ausschreibung", style = MaterialTheme.typography.titleLarge)
if (showWizard) {
Card(modifier = Modifier.fillMaxWidth().height(500.dp)) {
Card(modifier = Modifier.fillMaxWidth().height(600.dp)) {
TurnierWizard(
viewModel = turnierViewModel,
veranstaltungId = 0, // In Echt wird hier die ID aus dem State genutzt
veranstaltungId = 0, // Mock-Modus
onBack = { showWizard = false },
onFinish = {
showWizard = false
viewModel.addTurnier(turnierViewModel.state.turnierNr, "")
viewModel.addTurnier(turnierViewModel.state.turnierNr, "ZNS Ausschreibung")
}
)
}
@@ -52,7 +52,7 @@ data class VeranstaltungWizardState(
val startDatum: LocalDate? = null,
val endDatum: LocalDate? = null,
val logoUrl: String? = null,
val turniere: List<TurnierEntry> = listOf(TurnierEntry()),
val turniere: List<TurnierEntry> = emptyList(),
val isSaving: Boolean = false,
val error: String? = null,
val createdVeranstaltungId: Uuid? = null,
@@ -188,7 +188,11 @@ class VeranstaltungWizardViewModel(
}
fun addTurnier(nummer: String = "", pfad: String? = null) {
state = state.copy(turniere = state.turniere + TurnierEntry(nummer = nummer, ausschreibungPath = pfad))
val current = state.turniere.filter { it.nummer.isNotBlank() }
state = state.copy(turniere = current + TurnierEntry(nummer = nummer, ausschreibungPath = pfad))
// Reset child state for next tournament
turnierWizardViewModel.updateNr("")
turnierWizardViewModel.setNrConfirmed(false)
}
fun removeTurnier(index: Int) {