|
|
|
|
@ -76,12 +76,11 @@ struct PadelClubView: View { |
|
|
|
|
Text(_lastDataSourceDate.monthYearFormatted) |
|
|
|
|
Text("Classement mensuel utilisé") |
|
|
|
|
} |
|
|
|
|
.contextMenu { |
|
|
|
|
Button("Ré-importer") { |
|
|
|
|
} footer: { |
|
|
|
|
FooterButtonView("Ré-importer") { |
|
|
|
|
_startImporting() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if let mostRecentDateAvailable = SourceFileManager.shared.mostRecentDateAvailable, _lastDataSourceDate.isEarlierThan(mostRecentDateAvailable) { |
|
|
|
|
Section { |
|
|
|
|
@ -93,7 +92,8 @@ struct PadelClubView: View { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
RowButtonView("Télécharger les données précédentes", role: .destructive) { _downloadPreviousDate() |
|
|
|
|
RowButtonView("Télécharger les données précédentes", role: .destructive) { |
|
|
|
|
await _downloadPreviousDate() |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
Text("Padel Club va récupérer les données des mois précédents") |
|
|
|
|
@ -131,13 +131,13 @@ struct PadelClubView: View { |
|
|
|
|
Text("Dames") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
|
if let anonymousCount = monthData.anonymousCount { |
|
|
|
|
Text(anonymousCount.formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Joueurs anonymes") |
|
|
|
|
} |
|
|
|
|
// LabeledContent { |
|
|
|
|
// if let anonymousCount = monthData.anonymousCount { |
|
|
|
|
// Text(anonymousCount.formatted()) |
|
|
|
|
// } |
|
|
|
|
// } label: { |
|
|
|
|
// Text("Joueurs anonymes") |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
|
if let maleUnrankedValue = monthData.maleUnrankedValue { |
|
|
|
|
@ -234,11 +234,9 @@ struct PadelClubView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private func _downloadPreviousDate() { |
|
|
|
|
Task { |
|
|
|
|
private func _downloadPreviousDate() async { |
|
|
|
|
await SourceFileManager.shared.getAllFiles(initialDate: "08-2022") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#Preview { |
|
|
|
|
|