From 67edd56c5e86aa5c9a27022ee7292ef335129353 Mon Sep 17 00:00:00 2001 From: Raz Date: Wed, 24 Jul 2024 09:17:13 +0200 Subject: [PATCH] v105 bug fix import --- PadelClub.xcodeproj/project.pbxproj | 4 ++-- PadelClub/Utils/PadelRule.swift | 2 +- .../Event/TournamentConfiguratorView.swift | 2 +- PadelClub/Views/Tournament/FileImportView.swift | 17 +++++++---------- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 5ec2051..13e1517 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -1935,7 +1935,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 104; + CURRENT_PROJECT_VERSION = 105; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; @@ -1985,7 +1985,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 104; + CURRENT_PROJECT_VERSION = 105; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_TEAM = BQ3Y44M3Q6; diff --git a/PadelClub/Utils/PadelRule.swift b/PadelClub/Utils/PadelRule.swift index cb07550..a509b12 100644 --- a/PadelClub/Utils/PadelRule.swift +++ b/PadelClub/Utils/PadelRule.swift @@ -173,7 +173,7 @@ enum FederalTournamentAge: Int, Hashable, Codable, CaseIterable, Identifiable { var importingRawValue: String { switch self { case .unlisted: - return "Senior" + return "Animation" case .a11_12: return "11/12 ans" case .a13_14: diff --git a/PadelClub/Views/Cashier/Event/TournamentConfiguratorView.swift b/PadelClub/Views/Cashier/Event/TournamentConfiguratorView.swift index 65ecfc3..dfffa60 100644 --- a/PadelClub/Views/Cashier/Event/TournamentConfiguratorView.swift +++ b/PadelClub/Views/Cashier/Event/TournamentConfiguratorView.swift @@ -40,7 +40,7 @@ struct TournamentConfigurationView: View { } Picker(selection: $tournament.federalCategory, label: Text("Catégorie")) { ForEach(TournamentCategory.allCases) { type in - Text(type.localizedLabel(.title)).tag(type) + Text(type.localizedLabel(.wide)).tag(type) } } Picker(selection: $tournament.federalAgeCategory, label: Text("Limite d'âge")) { diff --git a/PadelClub/Views/Tournament/FileImportView.swift b/PadelClub/Views/Tournament/FileImportView.swift index 9150441..e6ffcdb 100644 --- a/PadelClub/Views/Tournament/FileImportView.swift +++ b/PadelClub/Views/Tournament/FileImportView.swift @@ -125,7 +125,11 @@ struct FileImportView: View { Text($0.localizedLabel).tag($0) } } label: { - Text("Source du fichier") + Text("Source") + } + + if fileProvider == .customAutoSearch { + Text("Padel Club essaiera de chercher les joueurs dans la base fédérale automatiquement") } RowButtonView("Démarrer l'importation") { @@ -142,17 +146,10 @@ struct FileImportView: View { if fileProvider == .frenchFederation { let footerString = "Fichier provenant de [beach-padel.app.fft.fr](\(URLs.beachPadel.rawValue))" Text(.init(footerString)) - } else if fileProvider == .custom { + } else if fileProvider == .custom || fileProvider == .customAutoSearch { FooterButtonView("Voir le format du fichier") { presentFormatHelperView = true } - } else if fileProvider == .customAutoSearch { - HStack { - Text("Padel Club essaiera de chercher les joueurs dans la base fédérale automatiquement") - FooterButtonView("Voir le format du fichier") { - presentFormatHelperView = true - } - } } } @@ -237,7 +234,7 @@ struct FileImportView: View { if filteredTeams.isEmpty && teams.isEmpty == false && multiImport == false { @Bindable var tournament = tournament Section { - Text("Aucune équipe \(tournament.tournamentCategory.importingRawValue) \(tournament.federalAgeCategory.importingRawValue) détectée mais \(teams.count) équipes sont dans le fichier") + Text("Aucune équipe \(tournament.tournamentCategory.importingRawValue) \(tournament.federalAgeCategory.importingRawValue.lowercased()) détectée mais \(teams.count) équipes sont dans le fichier") Picker(selection: $tournament.tournamentCategory) { ForEach([TournamentCategory.men, TournamentCategory.women, TournamentCategory.mix]) { category in Text(category.importingRawValue).tag(category)