|
|
|
@ -121,14 +121,14 @@ struct ActivityView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
.task { |
|
|
|
.task { |
|
|
|
if navigation.agendaDestination == .tenup |
|
|
|
if navigation.agendaDestination == .tenup |
|
|
|
&& dataStore.user.hasClubs() == true |
|
|
|
&& dataStore.user.hasTenupClubs() == true |
|
|
|
&& federalDataViewModel.federalTournaments.isEmpty { |
|
|
|
&& federalDataViewModel.federalTournaments.isEmpty { |
|
|
|
_gatherFederalTournaments() |
|
|
|
_gatherFederalTournaments() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.onChange(of: navigation.agendaDestination) { |
|
|
|
.onChange(of: navigation.agendaDestination) { |
|
|
|
if navigation.agendaDestination == .tenup |
|
|
|
if navigation.agendaDestination == .tenup |
|
|
|
&& dataStore.user.hasClubs() == true |
|
|
|
&& dataStore.user.hasTenupClubs() == true |
|
|
|
&& federalDataViewModel.federalTournaments.isEmpty { |
|
|
|
&& federalDataViewModel.federalTournaments.isEmpty { |
|
|
|
_gatherFederalTournaments() |
|
|
|
_gatherFederalTournaments() |
|
|
|
} |
|
|
|
} |
|
|
|
@ -192,7 +192,7 @@ struct ActivityView: View { |
|
|
|
.tint(.master) |
|
|
|
.tint(.master) |
|
|
|
} |
|
|
|
} |
|
|
|
.sheet(isPresented: $presentClubSearchView, onDismiss: { |
|
|
|
.sheet(isPresented: $presentClubSearchView, onDismiss: { |
|
|
|
if dataStore.user.hasClubs() == true { |
|
|
|
if dataStore.user.hasTenupClubs() == true { |
|
|
|
federalDataViewModel.federalTournaments.removeAll() |
|
|
|
federalDataViewModel.federalTournaments.removeAll() |
|
|
|
navigation.agendaDestination = .tenup |
|
|
|
navigation.agendaDestination = .tenup |
|
|
|
} |
|
|
|
} |
|
|
|
@ -247,7 +247,7 @@ struct ActivityView: View { |
|
|
|
RowButtonView("Créer un nouvel événement") { |
|
|
|
RowButtonView("Créer un nouvel événement") { |
|
|
|
newTournament = Tournament.newEmptyInstance() |
|
|
|
newTournament = Tournament.newEmptyInstance() |
|
|
|
} |
|
|
|
} |
|
|
|
if dataStore.user.hasClubs() == false { |
|
|
|
if dataStore.user.hasTenupClubs() == false { |
|
|
|
RowButtonView("Chercher l'un de vos clubs") { |
|
|
|
RowButtonView("Chercher l'un de vos clubs") { |
|
|
|
presentClubSearchView = true |
|
|
|
presentClubSearchView = true |
|
|
|
} |
|
|
|
} |
|
|
|
@ -268,7 +268,7 @@ struct ActivityView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func _tenupEmptyView() -> some View { |
|
|
|
private func _tenupEmptyView() -> some View { |
|
|
|
if dataStore.user.hasClubs() == false { |
|
|
|
if dataStore.user.hasTenupClubs() == false { |
|
|
|
ContentUnavailableView { |
|
|
|
ContentUnavailableView { |
|
|
|
Label("Aucun tournoi", systemImage: "shield.slash") |
|
|
|
Label("Aucun tournoi", systemImage: "shield.slash") |
|
|
|
} description: { |
|
|
|
} description: { |
|
|
|
|