|
|
|
|
@ -24,13 +24,15 @@ struct TournamentStatusView: View { |
|
|
|
|
} |
|
|
|
|
Section { |
|
|
|
|
if tournament.hasEnded() == false { |
|
|
|
|
if tournament.isCanceled == false { |
|
|
|
|
if tournament.currentCanceled == false { |
|
|
|
|
RowButtonView("Annuler le tournoi", role: .destructive) { |
|
|
|
|
tournament.isCanceled.toggle() |
|
|
|
|
tournament.setCanceled(true) |
|
|
|
|
self._save() |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
RowButtonView("Reprendre le tournoi", role: .destructive) { |
|
|
|
|
tournament.isCanceled.toggle() |
|
|
|
|
tournament.setCanceled(false) |
|
|
|
|
self._save() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -47,7 +49,7 @@ struct TournamentStatusView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.toolbarBackground(.visible, for: .navigationBar) |
|
|
|
|
.onChange(of: [tournament.isDeleted, tournament.isCanceled, tournament.isPrivate]) { |
|
|
|
|
.onChange(of: [tournament.isDeleted, tournament.isPrivate]) { |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|