fix stuff with import from scratch

club_update
Razmig Sarkissian 1 year ago
parent c25d356432
commit cf1fec2a27
  1. 5
      PadelClub/Views/Navigation/Umpire/PadelClubView.swift

@ -85,7 +85,7 @@ struct PadelClubView: View {
if let mostRecentDateAvailable = SourceFileManager.shared.mostRecentDateAvailable, _lastDataSourceDate.isEarlierThan(mostRecentDateAvailable) { if let mostRecentDateAvailable = SourceFileManager.shared.mostRecentDateAvailable, _lastDataSourceDate.isEarlierThan(mostRecentDateAvailable) {
Section { Section {
RowButtonView("Importer \(URL.importDateFormatter.string(from: mostRecentDateAvailable))") { RowButtonView("Importer \(mostRecentDateAvailable.monthYearFormatted)") {
_startImporting() _startImporting()
} }
} }
@ -109,7 +109,7 @@ struct PadelClubView: View {
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 let _mostRecentDateAvailable { if let _mostRecentDateAvailable {
RowButtonView("Démarrer l'importation de \(URL.importDateFormatter.string(from: _mostRecentDateAvailable))") { RowButtonView("Importer \(_mostRecentDateAvailable.monthYearFormatted)") {
_startImporting() _startImporting()
} }
} }
@ -222,6 +222,7 @@ struct PadelClubView: View {
await SourceFileManager.shared.fetchData() await SourceFileManager.shared.fetchData()
checkingFilesAttempt += 1 checkingFilesAttempt += 1
checkingFiles = false checkingFiles = false
uuid = UUID()
} }
private func _startImporting() { private func _startImporting() {

Loading…
Cancel
Save