From b8bf7f99e87bc24cda3771c6715449c26fa42960 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Fri, 5 Sep 2025 14:05:40 +0200 Subject: [PATCH] fix editscoreview yes add menu to change name --- PadelClub/Views/Match/MatchDetailView.swift | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/PadelClub/Views/Match/MatchDetailView.swift b/PadelClub/Views/Match/MatchDetailView.swift index c03425d..5e59ccb 100644 --- a/PadelClub/Views/Match/MatchDetailView.swift +++ b/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 {