|
|
|
@ -9,7 +9,7 @@ import SwiftUI |
|
|
|
|
|
|
|
|
|
|
|
struct InscriptionInfoView: View { |
|
|
|
struct InscriptionInfoView: View { |
|
|
|
@EnvironmentObject var dataStore: DataStore |
|
|
|
@EnvironmentObject var dataStore: DataStore |
|
|
|
@Environment(Tournament.self) var tournament |
|
|
|
let tournament: Tournament |
|
|
|
|
|
|
|
|
|
|
|
@State private var players : [PlayerRegistration] = [] |
|
|
|
@State private var players : [PlayerRegistration] = [] |
|
|
|
@State private var selectedTeams : [TeamRegistration] = [] |
|
|
|
@State private var selectedTeams : [TeamRegistration] = [] |
|
|
|
@ -244,30 +244,30 @@ struct InscriptionInfoView: View { |
|
|
|
Text("importé du fichier beach-padel sans licence valide ou créé sans licence") |
|
|
|
Text("importé du fichier beach-padel sans licence valide ou créé sans licence") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.task { |
|
|
|
.onAppear { |
|
|
|
await _getIssues() |
|
|
|
DispatchQueue.main.async { |
|
|
|
|
|
|
|
_getIssues() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.navigationTitle("Synthèse") |
|
|
|
.navigationTitle("Synthèse") |
|
|
|
.navigationBarTitleDisplayMode(.inline) |
|
|
|
.navigationBarTitleDisplayMode(.inline) |
|
|
|
.toolbarBackground(.visible, for: .navigationBar) |
|
|
|
.toolbarBackground(.visible, for: .navigationBar) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func _getIssues() async { |
|
|
|
private func _getIssues() { |
|
|
|
Task { |
|
|
|
players = tournament.unsortedPlayers() |
|
|
|
players = tournament.unsortedPlayers() |
|
|
|
selectedTeams = tournament.selectedSortedTeams() |
|
|
|
selectedTeams = tournament.selectedSortedTeams() |
|
|
|
callDateIssue = selectedTeams.filter { $0.callDate != nil && tournament.isStartDateIsDifferentThanCallDate($0) } |
|
|
|
callDateIssue = selectedTeams.filter { $0.callDate != nil && tournament.isStartDateIsDifferentThanCallDate($0) } |
|
|
|
waitingList = tournament.waitingListTeams(in: selectedTeams, includingWalkOuts: true) |
|
|
|
waitingList = tournament.waitingListTeams(in: selectedTeams, includingWalkOuts: true) |
|
|
|
duplicates = tournament.duplicates(in: players) |
|
|
|
duplicates = tournament.duplicates(in: players) |
|
|
|
homonyms = tournament.homonyms(in: players) |
|
|
|
homonyms = tournament.homonyms(in: players) |
|
|
|
problematicPlayers = players.filter({ $0.sex == nil }) |
|
|
|
problematicPlayers = players.filter({ $0.sex == nil }) |
|
|
|
inadequatePlayers = tournament.inadequatePlayers(in: players) |
|
|
|
inadequatePlayers = tournament.inadequatePlayers(in: players) |
|
|
|
ageInadequatePlayers = tournament.ageInadequatePlayers(in: players) |
|
|
|
ageInadequatePlayers = tournament.ageInadequatePlayers(in: players) |
|
|
|
let isImported = players.anySatisfy({ $0.isImported() }) |
|
|
|
let isImported = players.anySatisfy({ $0.isImported() }) |
|
|
|
playersWithoutValidLicense = tournament.playersWithoutValidLicense(in: players, isImported: isImported) |
|
|
|
playersWithoutValidLicense = tournament.playersWithoutValidLicense(in: players, isImported: isImported) |
|
|
|
entriesFromBeachPadel = tournament.unsortedTeams().filter({ $0.isImported() }) |
|
|
|
entriesFromBeachPadel = tournament.unsortedTeams().filter({ $0.isImported() }) |
|
|
|
playersMissing = selectedTeams.filter({ $0.unsortedPlayers().count < 2 }) |
|
|
|
playersMissing = selectedTeams.filter({ $0.unsortedPlayers().count < 2 }) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|