|
|
|
@ -133,6 +133,9 @@ struct TournamentLookUpView: View { |
|
|
|
Menu { |
|
|
|
Menu { |
|
|
|
#if DEBUG |
|
|
|
#if DEBUG |
|
|
|
if tournaments.isEmpty == false { |
|
|
|
if tournaments.isEmpty == false { |
|
|
|
|
|
|
|
Button("Gather Mobile Phone") { |
|
|
|
|
|
|
|
_gatherNumbers() |
|
|
|
|
|
|
|
} |
|
|
|
Section { |
|
|
|
Section { |
|
|
|
ShareLink(item: pastedTournaments) { |
|
|
|
ShareLink(item: pastedTournaments) { |
|
|
|
Label("Par texte", systemImage: "square.and.arrow.up") |
|
|
|
Label("Par texte", systemImage: "square.and.arrow.up") |
|
|
|
@ -180,6 +183,20 @@ struct TournamentLookUpView: View { |
|
|
|
private var liguesFound: [String] { |
|
|
|
private var liguesFound: [String] { |
|
|
|
Set(tournaments.compactMap { $0.nomLigue }).sorted() |
|
|
|
Set(tournaments.compactMap { $0.nomLigue }).sorted() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private func _gatherNumbers() { |
|
|
|
|
|
|
|
Task { |
|
|
|
|
|
|
|
print("Doing.....") |
|
|
|
|
|
|
|
for i in 0..<tournaments.count { |
|
|
|
|
|
|
|
print(i, "/", tournaments.count) |
|
|
|
|
|
|
|
let phone = try? await NetworkFederalService.shared.getUmpireData(idTournament: tournaments[i].id).phone |
|
|
|
|
|
|
|
federalDataViewModel.searchedFederalTournaments[i].updateJapPhoneNumber(phone: phone) |
|
|
|
|
|
|
|
print(federalDataViewModel.searchedFederalTournaments[i].japMessage) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(".....Done") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func runSearch() { |
|
|
|
private func runSearch() { |
|
|
|
dataStore.appSettingsStorage.write() |
|
|
|
dataStore.appSettingsStorage.write() |
|
|
|
|