fix editscoreview yes

add menu to change name
sync3
Razmig Sarkissian 2 months ago
parent dd98548a15
commit b8bf7f99e8
  1. 27
      PadelClub/Views/Match/MatchDetailView.swift

@ -354,6 +354,33 @@ struct MatchDetailView: View {
Text("Remise-à-zéro")
}
Menu {
Button("Effacer le nom") {
match.name = nil
tournamentStore?.matches.addOrUpdate(instance: match)
}
if let tournament = match.currentTournament() {
Menu {
ForEach(tournament.generateSeedGroups(base: 16, teamCount: 8), id: \.self) { seedGroup in
Button {
match.name = seedGroup.localizedInterval()
tournamentStore?.matches.addOrUpdate(instance: match)
} label: {
Text(seedGroup.localizedInterval())
}
}
} label: {
Text("Choisir un nom")
}
}
} label: {
Text("[Site] Nom du match")
if let name = match.name {
Text("(\(name))")
}
}
if match.teamScores.isEmpty == false {
Divider()
Menu {

Loading…
Cancel
Save