|
|
|
@ -93,15 +93,29 @@ struct PlanningSettingsView: View { |
|
|
|
.foregroundStyle(.logoRed) |
|
|
|
.foregroundStyle(.logoRed) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
NavigationLink { |
|
|
|
if tournament.groupStageCount > 0 { |
|
|
|
List { |
|
|
|
Section { |
|
|
|
_optionsView() |
|
|
|
TournamentFieldsManagerView(localizedStringKey: "Poule en parallèle", count: $groupStageChunkCount, max: tournament.groupStageCount) |
|
|
|
|
|
|
|
.onChange(of: groupStageChunkCount) { |
|
|
|
|
|
|
|
matchScheduler.groupStageChunkCount = groupStageChunkCount |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} footer: { |
|
|
|
|
|
|
|
NavigationLink { |
|
|
|
|
|
|
|
_optionsView() |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Text("Voir les options avancées") |
|
|
|
|
|
|
|
.underline() |
|
|
|
|
|
|
|
.foregroundStyle(.master) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Section { |
|
|
|
|
|
|
|
NavigationLink { |
|
|
|
|
|
|
|
_optionsView() |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Text("Voir les options avancées") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.navigationTitle("Options avancées") |
|
|
|
|
|
|
|
.navigationBarTitleDisplayMode(.inline) |
|
|
|
|
|
|
|
.toolbarBackground(.visible, for: .navigationBar) |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Text("Voir les options avancées") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let allMatches = tournament.allMatches() |
|
|
|
let allMatches = tournament.allMatches() |
|
|
|
@ -204,75 +218,70 @@ struct PlanningSettingsView: View { |
|
|
|
|
|
|
|
|
|
|
|
@ViewBuilder |
|
|
|
@ViewBuilder |
|
|
|
private func _optionsView() -> some View { |
|
|
|
private func _optionsView() -> some View { |
|
|
|
if tournament.groupStageCount > 0 { |
|
|
|
List { |
|
|
|
Section { |
|
|
|
Section { |
|
|
|
TournamentFieldsManagerView(localizedStringKey: "Poule en parallèle", count: $groupStageChunkCount, max: tournament.groupStageCount) |
|
|
|
Toggle(isOn: $matchScheduler.overrideCourtsUnavailability) { |
|
|
|
.onChange(of: groupStageChunkCount) { |
|
|
|
Text("Ne pas tenir compte des autres épreuves") |
|
|
|
matchScheduler.groupStageChunkCount = groupStageChunkCount |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} footer: { |
|
|
|
|
|
|
|
Text("Vous pouvez indiquer le nombre de poule démarrant en même temps.") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
|
|
|
Toggle(isOn: $matchScheduler.overrideCourtsUnavailability) { |
|
|
|
|
|
|
|
Text("Ne pas tenir compte des autres épreuves") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Toggle(isOn: $matchScheduler.randomizeCourts) { |
|
|
|
Toggle(isOn: $matchScheduler.randomizeCourts) { |
|
|
|
Text("Distribuer les terrains au hasard") |
|
|
|
Text("Distribuer les terrains au hasard") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Toggle(isOn: $matchScheduler.shouldHandleUpperRoundSlice) { |
|
|
|
Toggle(isOn: $matchScheduler.shouldHandleUpperRoundSlice) { |
|
|
|
Text("Équilibrer les matchs d'une manche sur plusieurs tours") |
|
|
|
Text("Équilibrer les matchs d'une manche sur plusieurs tours") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Toggle(isOn: $matchScheduler.shouldEndRoundBeforeStartingNext) { |
|
|
|
Toggle(isOn: $matchScheduler.shouldEndRoundBeforeStartingNext) { |
|
|
|
Text("Finir une manche, classement inclus avant de continuer") |
|
|
|
Text("Finir une manche, classement inclus avant de continuer") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
|
|
|
Toggle(isOn: $matchScheduler.accountUpperBracketBreakTime) { |
|
|
|
|
|
|
|
Text("Tenir compte des pauses") |
|
|
|
|
|
|
|
Text("Tableau") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Toggle(isOn: $matchScheduler.accountLoserBracketBreakTime) { |
|
|
|
Section { |
|
|
|
Text("Tenir compte des pauses") |
|
|
|
Toggle(isOn: $matchScheduler.accountUpperBracketBreakTime) { |
|
|
|
Text("Classement") |
|
|
|
Text("Tenir compte des pauses") |
|
|
|
} |
|
|
|
Text("Tableau") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
Toggle(isOn: $matchScheduler.accountLoserBracketBreakTime) { |
|
|
|
Toggle(isOn: $matchScheduler.rotationDifferenceIsImportant) { |
|
|
|
Text("Tenir compte des pauses") |
|
|
|
Text("Forcer un créneau supplémentaire entre 2 phases") |
|
|
|
Text("Classement") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
Section { |
|
|
|
StepperView(count: $matchScheduler.upperBracketRotationDifference, minimum: 0, maximum: 2) |
|
|
|
Toggle(isOn: $matchScheduler.rotationDifferenceIsImportant) { |
|
|
|
} label: { |
|
|
|
Text("Forcer un créneau supplémentaire entre 2 phases") |
|
|
|
Text("Tableau") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
|
|
|
|
StepperView(count: $matchScheduler.upperBracketRotationDifference, minimum: 0, maximum: 2) |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Text("Tableau") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.disabled(matchScheduler.rotationDifferenceIsImportant == false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
|
|
|
|
StepperView(count: $matchScheduler.loserBracketRotationDifference, minimum: 0, maximum: 2) |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Text("Classement") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.disabled(matchScheduler.rotationDifferenceIsImportant == false) |
|
|
|
} |
|
|
|
} |
|
|
|
.disabled(matchScheduler.rotationDifferenceIsImportant == false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
Section { |
|
|
|
StepperView(count: $matchScheduler.loserBracketRotationDifference, minimum: 0, maximum: 2) |
|
|
|
LabeledContent { |
|
|
|
} label: { |
|
|
|
StepperView(count: $matchScheduler.timeDifferenceLimit, step: 5) |
|
|
|
Text("Classement") |
|
|
|
} label: { |
|
|
|
} |
|
|
|
Text("Optimisation des créneaux") |
|
|
|
.disabled(matchScheduler.rotationDifferenceIsImportant == false) |
|
|
|
Text("Si libre plus de \(matchScheduler.timeDifferenceLimit) minutes") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
|
|
|
|
StepperView(count: $matchScheduler.timeDifferenceLimit, step: 5) |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Text("Optimisation des créneaux") |
|
|
|
|
|
|
|
Text("Si libre plus de \(matchScheduler.timeDifferenceLimit) minutes") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.navigationTitle("Options avancées") |
|
|
|
|
|
|
|
.navigationBarTitleDisplayMode(.inline) |
|
|
|
|
|
|
|
.toolbarBackground(.visible, for: .navigationBar) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func _setupSchedule() async -> Bool { |
|
|
|
private func _setupSchedule() async -> Bool { |
|
|
|
|