|
|
|
@ -190,6 +190,20 @@ struct PlanningSettingsView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private func _localizedFooterMessage(groupStagesWithDateIsEmpty: Bool, roundsWithDateIsEmpty: Bool) -> String { |
|
|
|
|
|
|
|
let base = "Supprime les horaires des matchs restants non démarrés." |
|
|
|
|
|
|
|
let extend = " Garde les horaires définis pour les " |
|
|
|
|
|
|
|
if groupStagesWithDateIsEmpty && roundsWithDateIsEmpty { |
|
|
|
|
|
|
|
return base |
|
|
|
|
|
|
|
} else if groupStagesWithDateIsEmpty, roundsWithDateIsEmpty == false { |
|
|
|
|
|
|
|
return base + extend + "manches du tableau." |
|
|
|
|
|
|
|
} else if roundsWithDateIsEmpty, groupStagesWithDateIsEmpty == false { |
|
|
|
|
|
|
|
return base + extend + "poules." |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return base + extend + "poules et les manches du tableau." |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ViewBuilder |
|
|
|
@ViewBuilder |
|
|
|
private func _smartView() -> some View { |
|
|
|
private func _smartView() -> some View { |
|
|
|
let allMatches = tournament.allMatches().filter({ $0.hasEnded() == false && $0.hasStarted() == false }) |
|
|
|
let allMatches = tournament.allMatches().filter({ $0.hasEnded() == false && $0.hasStarted() == false }) |
|
|
|
@ -221,7 +235,7 @@ struct PlanningSettingsView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} footer: { |
|
|
|
} footer: { |
|
|
|
Text("Supprime les horaires des matchs restants non démarrés. Garde les horaires définis pour les poules et les manches du tableau.") |
|
|
|
Text(_localizedFooterMessage(groupStagesWithDateIsEmpty: groupStagesWithDate.isEmpty, roundsWithDateIsEmpty: roundsWithDate.isEmpty)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|