|
|
|
|
@ -193,7 +193,7 @@ struct TableStructureView: View { |
|
|
|
|
} label: { |
|
|
|
|
Text("Nombre de têtes de série") |
|
|
|
|
|
|
|
|
|
if tsPure > 0 && (tsPure > teamCount / 2 || tsPure < teamCount / 8 || tsPure < qualifiedFromGroupStage + groupStageAdditionalQualified) { |
|
|
|
|
if groupStageCount > 0 && tsPure > 0 && (tsPure > teamCount / 2 || tsPure < teamCount / 8 || tsPure < qualifiedFromGroupStage + groupStageAdditionalQualified) { |
|
|
|
|
Text("Attention !").foregroundStyle(.red) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -212,7 +212,7 @@ struct TableStructureView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
if tsPure > 0 && structurePreset != .doubleGroupStage { |
|
|
|
|
if tsPure > 0 && structurePreset != .doubleGroupStage, groupStageCount > 0 { |
|
|
|
|
if tsPure > teamCount / 2 { |
|
|
|
|
Text("Le nombre de têtes de série ne devrait pas être supérieur à la moitié de l'effectif.").foregroundStyle(.red) |
|
|
|
|
} else if tsPure < teamCount / 8 { |
|
|
|
|
@ -288,6 +288,10 @@ struct TableStructureView: View { |
|
|
|
|
} else { |
|
|
|
|
updatedElements.remove(.groupStageCount) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if structurePreset.isFederalPreset(), groupStageCount == 0 { |
|
|
|
|
teamCount = structurePreset.tableDimension() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.onChange(of: teamsPerGroupStage) { |
|
|
|
|
if teamsPerGroupStage != tournament.teamsPerGroupStage { |
|
|
|
|
|