|
|
|
@ -370,27 +370,29 @@ struct GroupStageNameEditionView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func maximumSize() -> Int { |
|
|
|
private func maximumSize() -> Int { |
|
|
|
if groupStage.index == 0 { |
|
|
|
return 10 |
|
|
|
return tournament.teamsPerGroupStage + 1 |
|
|
|
// if groupStage.index == 0 { |
|
|
|
} |
|
|
|
// return tournament.teamsPerGroupStage + 1 |
|
|
|
|
|
|
|
// } |
|
|
|
if let previousGroupStage = tournament.groupStages().first(where: { $0.index == groupStage.index - 1 }), previousGroupStage.size > groupStage.size { |
|
|
|
// |
|
|
|
return tournament.teamsPerGroupStage + 1 |
|
|
|
// if let previousGroupStage = tournament.groupStages().first(where: { $0.index == groupStage.index - 1 }), previousGroupStage.size > groupStage.size { |
|
|
|
} |
|
|
|
// return tournament.teamsPerGroupStage + 1 |
|
|
|
|
|
|
|
// } |
|
|
|
return tournament.teamsPerGroupStage |
|
|
|
// |
|
|
|
|
|
|
|
// return tournament.teamsPerGroupStage |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func minimumSize() -> Int { |
|
|
|
private func minimumSize() -> Int { |
|
|
|
if groupStage.index == tournament.groupStageCount - 1 { |
|
|
|
return 3 |
|
|
|
return max(3, tournament.teamsPerGroupStage - 1) |
|
|
|
// if groupStage.index == tournament.groupStageCount - 1 { |
|
|
|
} |
|
|
|
// return max(3, tournament.teamsPerGroupStage - 1) |
|
|
|
|
|
|
|
// } |
|
|
|
if let nextGroupStage = tournament.groupStages().first(where: { $0.index == groupStage.index + 1 }), nextGroupStage.size < groupStage.size { |
|
|
|
// |
|
|
|
return max(3, tournament.teamsPerGroupStage - 1) |
|
|
|
// if let nextGroupStage = tournament.groupStages().first(where: { $0.index == groupStage.index + 1 }), nextGroupStage.size < groupStage.size { |
|
|
|
} |
|
|
|
// return max(3, tournament.teamsPerGroupStage - 1) |
|
|
|
|
|
|
|
// } |
|
|
|
return tournament.teamsPerGroupStage |
|
|
|
// |
|
|
|
|
|
|
|
// return tournament.teamsPerGroupStage |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func _save() { |
|
|
|
private func _save() { |
|
|
|
|