Fixed tournament - groups in end round and place 3
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 47s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 47s
This commit is contained in:
@@ -621,7 +621,15 @@ internal fun TournamentEditorMatchesTab(
|
||||
var confirmDelete by remember { mutableStateOf<Pair<Int, Int>?>(null) }
|
||||
var editingSet by remember { mutableStateOf<Pair<Int, Int>?>(null) }
|
||||
var editInput by remember { mutableStateOf("") }
|
||||
val hasKO = matches.any { (it.round ?: "").lowercase() != "group" && (it.round ?: "").isNotBlank() }
|
||||
fun isEmptyThirdPlacePlaceholder(match: TournamentMatchDto): Boolean {
|
||||
return match.round.contains("Spiel um Platz 3") &&
|
||||
match.player1Id == null &&
|
||||
match.player2Id == null &&
|
||||
match.player1 == null &&
|
||||
match.player2 == null &&
|
||||
match.result == null
|
||||
}
|
||||
val hasKO = matches.any { it.round.lowercase() != "group" && it.round.isNotBlank() && !isEmptyThirdPlacePlaceholder(it) }
|
||||
var showDistributedDialog by remember { mutableStateOf(false) }
|
||||
var distributedMatches by remember { mutableStateOf<List<TournamentMatchDto>>(emptyList()) }
|
||||
var distributedMessage by remember { mutableStateOf<String?>(null) }
|
||||
@@ -681,7 +689,7 @@ internal fun TournamentEditorMatchesTab(
|
||||
}) { Text(tr("tournaments.distributeTables", "Freie Tische verteilen")) }
|
||||
}
|
||||
// Table-like view: show header + flattened rows so Android resembles web UI
|
||||
val displayList = matches.sortedWith(compareBy<TournamentMatchDto> {
|
||||
val displayList = matches.filterNot { isEmptyThirdPlacePlaceholder(it) }.sortedWith(compareBy<TournamentMatchDto> {
|
||||
it.isFinished == true
|
||||
}.thenBy {
|
||||
// primary: if groupRound available use it, else try parse round as int, else large
|
||||
|
||||
Reference in New Issue
Block a user