fix file import view

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

@ -36,11 +36,19 @@ 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) { convertingFile = false
Label("beach-padel.app.fft.fr", systemImage: "tennisball") isShowing.toggle()
}
} footer: {
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) { Picker(selection: $fileProvider) {
ForEach(FileImportManager.FileProvider.allCases) { ForEach(FileImportManager.FileProvider.allCases) {
Text($0.localizedLabel).tag($0) Text($0.localizedLabel).tag($0)
@ -48,17 +56,7 @@ struct FileImportView: View {
} label: { } label: {
Text("Source du fichier") Text("Source du fichier")
} }
Button {
convertingFile = false
isShowing.toggle()
} label: {
Label("Choisir le fichier", systemImage: "square.and.arrow.down")
} }
} header: {
} footer: {
Text("Fichier provenant de beach-padel.app.fft.fr")
} }
} }

@ -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