|
|
|
|
@ -2386,6 +2386,23 @@ defer { |
|
|
|
|
return federalTournamentAge.minimumNumberOfTeams(inCategory: tournamentCategory, andInLevel: tournamentLevel) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public func removeAllDates() { |
|
|
|
|
let allMatches = allMatches() |
|
|
|
|
allMatches.forEach({ |
|
|
|
|
$0.startDate = nil |
|
|
|
|
$0.confirmed = false |
|
|
|
|
}) |
|
|
|
|
self.tournamentStore?.matches.addOrUpdate(contentOfs: allMatches) |
|
|
|
|
|
|
|
|
|
let allGroupStages = groupStages() |
|
|
|
|
allGroupStages.forEach({ $0.startDate = nil }) |
|
|
|
|
self.tournamentStore?.groupStages.addOrUpdate(contentOfs: allGroupStages) |
|
|
|
|
|
|
|
|
|
let allRounds = allRounds() |
|
|
|
|
allRounds.forEach({ $0.startDate = nil }) |
|
|
|
|
self.tournamentStore?.rounds.addOrUpdate(contentOfs: allRounds) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// MARK: - |
|
|
|
|
|
|
|
|
|
func insertOnServer() throws { |
|
|
|
|
|