|
|
|
|
@ -40,118 +40,120 @@ struct BroadcastView: View { |
|
|
|
|
.tipStyle(tint: nil) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
if tournament.areTeamsPublished() { |
|
|
|
|
Image(systemName:"checkmark").foregroundStyle(.green) |
|
|
|
|
} else { |
|
|
|
|
Text(tournament.publishedTeamsDate().formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
if tournament.areTeamsPublished() { |
|
|
|
|
Text("Publiée") |
|
|
|
|
} else { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Toggle(isOn: $tournament.hideTeamsWeight) { |
|
|
|
|
Text("Masquer les poids des équipes") |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Liste des équipes") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < tournament.publishedTeamsDate() { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishTeams ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishTeams.toggle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
if tournament.areSummonsPublished() { |
|
|
|
|
Image(systemName:"checkmark").foregroundStyle(.green) |
|
|
|
|
} else { |
|
|
|
|
Text(tournament.publishedTeamsDate().formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
if tournament.areSummonsPublished() { |
|
|
|
|
Text("Publiées") |
|
|
|
|
} else { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Convocations") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < tournament.publishedTeamsDate() { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishSummons ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishSummons.toggle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if let publishedGroupStagesDate = tournament.publishedGroupStagesDate() { |
|
|
|
|
if tournament.isPrivate == false { |
|
|
|
|
Section { |
|
|
|
|
let areGroupStagesPublished = tournament.areGroupStagesPublished() |
|
|
|
|
LabeledContent { |
|
|
|
|
if areGroupStagesPublished { |
|
|
|
|
if tournament.areTeamsPublished() { |
|
|
|
|
Image(systemName:"checkmark").foregroundStyle(.green) |
|
|
|
|
} else { |
|
|
|
|
Text(publishedGroupStagesDate.formatted()) |
|
|
|
|
Text(tournament.publishedTeamsDate().formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
if areGroupStagesPublished { |
|
|
|
|
Text("Publiées") |
|
|
|
|
if tournament.areTeamsPublished() { |
|
|
|
|
Text("Publiée") |
|
|
|
|
} else { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Toggle(isOn: $tournament.hideTeamsWeight) { |
|
|
|
|
Text("Masquer les poids des équipes") |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Poules") |
|
|
|
|
Text("Liste des équipes") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < publishedGroupStagesDate { |
|
|
|
|
if Date() < tournament.publishedTeamsDate() { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishGroupStages ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishGroupStages.toggle() |
|
|
|
|
FooterButtonView(tournament.publishTeams ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishTeams.toggle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if let publishedBracketsDate = tournament.publishedBracketsDate() { |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
let areBracketsPublished = tournament.areBracketsPublished() |
|
|
|
|
LabeledContent { |
|
|
|
|
if areBracketsPublished { |
|
|
|
|
if tournament.areSummonsPublished() { |
|
|
|
|
Image(systemName:"checkmark").foregroundStyle(.green) |
|
|
|
|
} else { |
|
|
|
|
Text(publishedBracketsDate.formatted()) |
|
|
|
|
Text(tournament.publishedTeamsDate().formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
if areBracketsPublished { |
|
|
|
|
Text("Publié") |
|
|
|
|
if tournament.areSummonsPublished() { |
|
|
|
|
Text("Publiées") |
|
|
|
|
} else { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Tableau") |
|
|
|
|
Text("Convocations") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < publishedBracketsDate { |
|
|
|
|
if Date() < tournament.publishedTeamsDate() { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishBrackets ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishBrackets.toggle() |
|
|
|
|
FooterButtonView(tournament.publishSummons ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishSummons.toggle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if let publishedGroupStagesDate = tournament.publishedGroupStagesDate() { |
|
|
|
|
Section { |
|
|
|
|
let areGroupStagesPublished = tournament.areGroupStagesPublished() |
|
|
|
|
LabeledContent { |
|
|
|
|
if areGroupStagesPublished { |
|
|
|
|
Image(systemName:"checkmark").foregroundStyle(.green) |
|
|
|
|
} else { |
|
|
|
|
Text(publishedGroupStagesDate.formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
if areGroupStagesPublished { |
|
|
|
|
Text("Publiées") |
|
|
|
|
} else { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Poules") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < publishedGroupStagesDate { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishGroupStages ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishGroupStages.toggle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if let publishedBracketsDate = tournament.publishedBracketsDate() { |
|
|
|
|
Section { |
|
|
|
|
let areBracketsPublished = tournament.areBracketsPublished() |
|
|
|
|
LabeledContent { |
|
|
|
|
if areBracketsPublished { |
|
|
|
|
Image(systemName:"checkmark").foregroundStyle(.green) |
|
|
|
|
} else { |
|
|
|
|
Text(publishedBracketsDate.formatted()) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
if areBracketsPublished { |
|
|
|
|
Text("Publié") |
|
|
|
|
} else { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Tableau") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < publishedBracketsDate { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishBrackets ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
tournament.publishBrackets.toggle() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|