|
|
|
|
@ -17,7 +17,7 @@ struct UmpireStatisticView: View { |
|
|
|
|
let countedWalkoutPlayers: [String: Int] |
|
|
|
|
|
|
|
|
|
init() { |
|
|
|
|
let teams = DataStore.shared.tournaments.flatMap({ $0.unsortedTeams() }) |
|
|
|
|
let teams = DataStore.shared.tournaments.filter { $0.isDeleted == false }.flatMap({ $0.unsortedTeams() }) |
|
|
|
|
let wos = teams.filter({ $0.walkOut }) |
|
|
|
|
self.walkoutTeams = wos |
|
|
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ struct UmpireStatisticView: View { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
self.players = Array(uniquePlayersDict.values).sorted(by: { a, b in |
|
|
|
|
playerCountDict[a.licenceId!.strippedLicense!]! > playerCountDict[b.licenceId!.strippedLicense!]! |
|
|
|
|
playerWalkOutCountDict[a.licenceId!.strippedLicense!]! > playerWalkOutCountDict[b.licenceId!.strippedLicense!]! |
|
|
|
|
}) |
|
|
|
|
self.countedPlayers = playerCountDict |
|
|
|
|
self.countedWalkoutPlayers = playerWalkOutCountDict |
|
|
|
|
|