|
|
|
@ -9,6 +9,7 @@ import SwiftUI |
|
|
|
import LeStorage |
|
|
|
import LeStorage |
|
|
|
|
|
|
|
|
|
|
|
struct PadelClubView: View { |
|
|
|
struct PadelClubView: View { |
|
|
|
|
|
|
|
@State private var uuid: UUID = UUID() |
|
|
|
@State private var checkingFilesAttempt: Int = 0 |
|
|
|
@State private var checkingFilesAttempt: Int = 0 |
|
|
|
@State private var checkingFiles: Bool = false |
|
|
|
@State private var checkingFiles: Bool = false |
|
|
|
@AppStorage("importingFiles") var importingFiles: Bool = false |
|
|
|
@AppStorage("importingFiles") var importingFiles: Bool = false |
|
|
|
@ -107,8 +108,8 @@ struct PadelClubView: View { |
|
|
|
} description: { |
|
|
|
} description: { |
|
|
|
Text("Padel Club peut importer toutes les données publiques de la FFT concernant tous les compétiteurs et compétitrices.") |
|
|
|
Text("Padel Club peut importer toutes les données publiques de la FFT concernant tous les compétiteurs et compétitrices.") |
|
|
|
} actions: { |
|
|
|
} actions: { |
|
|
|
if lastDataSource != nil { |
|
|
|
if let _mostRecentDateAvailable { |
|
|
|
RowButtonView("Démarrer l'importation") { |
|
|
|
RowButtonView("Démarrer l'importation de \(URL.importDateFormatter.string(from: _mostRecentDateAvailable))") { |
|
|
|
_startImporting() |
|
|
|
_startImporting() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -177,6 +178,7 @@ struct PadelClubView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.id(uuid) |
|
|
|
.task { |
|
|
|
.task { |
|
|
|
await self._checkSourceFileAvailability() |
|
|
|
await self._checkSourceFileAvailability() |
|
|
|
} |
|
|
|
} |
|
|
|
@ -238,6 +240,7 @@ struct PadelClubView: View { |
|
|
|
|
|
|
|
|
|
|
|
private func _downloadPreviousDate() async { |
|
|
|
private func _downloadPreviousDate() async { |
|
|
|
await SourceFileManager.shared.getAllFiles(initialDate: "08-2022") |
|
|
|
await SourceFileManager.shared.getAllFiles(initialDate: "08-2022") |
|
|
|
|
|
|
|
self.uuid = UUID() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|