fix file import view

multistore
Razmig Sarkissian 2 years ago
parent f80ea92db7
commit c4a6d37446
  1. 36
      PadelClub/Views/Tournament/FileImportView.swift
  2. 4
      PadelClub/Views/Tournament/TournamentRunningView.swift

@ -36,29 +36,27 @@ struct FileImportView: View {
List { List {
if teams.isEmpty { if teams.isEmpty {
Section { Section {
RowButtonView("Choisir le fichier", systemImage: "square.and.arrow.down") {
Link(destination: URLs.beachPadel.url) {
Label("beach-padel.app.fft.fr", systemImage: "tennisball")
}
Picker(selection: $fileProvider) {
ForEach(FileImportManager.FileProvider.allCases) {
Text($0.localizedLabel).tag($0)
}
} label: {
Text("Source du fichier")
}
Button {
convertingFile = false convertingFile = false
isShowing.toggle() isShowing.toggle()
} label: {
Label("Choisir le fichier", systemImage: "square.and.arrow.down")
} }
} header: {
} footer: { } footer: {
Text("Fichier provenant de beach-padel.app.fft.fr") if fileProvider == .frenchFederation {
let footerString = "Fichier provenant de [beach-padel.app.fft.fr](\(URLs.beachPadel.rawValue))"
Text(.init(footerString))
}
}
if fileContent != nil {
Section {
Picker(selection: $fileProvider) {
ForEach(FileImportManager.FileProvider.allCases) {
Text($0.localizedLabel).tag($0)
}
} label: {
Text("Source du fichier")
}
}
} }
} }

@ -73,8 +73,8 @@ struct TournamentRunningView: View {
} }
MatchListView(section: "en cours", matches: tournament.runningMatches(allMatches)) MatchListView(section: "en cours", matches: tournament.runningMatches(allMatches))
// MatchListView(section: "à lancer", matches: tournament.readyMatches(allMatches)) MatchListView(section: "à lancer", matches: tournament.readyMatches(allMatches), isExpanded: false)
// MatchListView(section: "disponible", matches: tournament.availableToStart(allMatches)) MatchListView(section: "disponible", matches: tournament.availableToStart(allMatches), isExpanded: false)
MatchListView(section: "terminés", matches: tournament.finishedMatches(allMatches), isExpanded: false) MatchListView(section: "terminés", matches: tournament.finishedMatches(allMatches), isExpanded: false)
} }
} }

Loading…
Cancel
Save