|
|
|
|
@ -1048,59 +1048,59 @@ struct InscriptionManagerView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ViewBuilder |
|
|
|
|
private func _prioritizeClubMembersButton() -> some View { |
|
|
|
|
@Bindable var tournament = tournament |
|
|
|
|
if let federalClub = tournament.club() { |
|
|
|
|
Menu { |
|
|
|
|
Picker(selection: $tournament.prioritizeClubMembers) { |
|
|
|
|
Text("Oui").tag(true) |
|
|
|
|
Text("Non").tag(false) |
|
|
|
|
} label: { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
.labelsHidden() |
|
|
|
|
|
|
|
|
|
Divider() |
|
|
|
|
NavigationLink { |
|
|
|
|
ClubsView() { club in |
|
|
|
|
if let event = tournament.eventObject() { |
|
|
|
|
event.club = club.id |
|
|
|
|
do { |
|
|
|
|
try dataStore.events.addOrUpdate(instance: event) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Changer de club") |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Membres prioritaires") |
|
|
|
|
Text(federalClub.acronym) |
|
|
|
|
} |
|
|
|
|
Divider() |
|
|
|
|
} else { |
|
|
|
|
NavigationLink { |
|
|
|
|
ClubsView() { club in |
|
|
|
|
if let event = tournament.eventObject() { |
|
|
|
|
event.club = club.id |
|
|
|
|
do { |
|
|
|
|
try dataStore.events.addOrUpdate(instance: event) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Identifier le club") |
|
|
|
|
} |
|
|
|
|
Divider() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// @ViewBuilder |
|
|
|
|
// private func _prioritizeClubMembersButton() -> some View { |
|
|
|
|
// @Bindable var tournament = tournament |
|
|
|
|
// if let federalClub = tournament.club() { |
|
|
|
|
// Menu { |
|
|
|
|
// Picker(selection: $tournament.prioritizeClubMembers) { |
|
|
|
|
// Text("Oui").tag(true) |
|
|
|
|
// Text("Non").tag(false) |
|
|
|
|
// } label: { |
|
|
|
|
// |
|
|
|
|
// } |
|
|
|
|
// .labelsHidden() |
|
|
|
|
// |
|
|
|
|
// Divider() |
|
|
|
|
// NavigationLink { |
|
|
|
|
// ClubsView() { club in |
|
|
|
|
// if let event = tournament.eventObject() { |
|
|
|
|
// event.club = club.id |
|
|
|
|
// do { |
|
|
|
|
// try dataStore.events.addOrUpdate(instance: event) |
|
|
|
|
// } catch { |
|
|
|
|
// Logger.error(error) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// _save() |
|
|
|
|
// } |
|
|
|
|
// } label: { |
|
|
|
|
// Text("Changer de club") |
|
|
|
|
// } |
|
|
|
|
// } label: { |
|
|
|
|
// Text("Membres prioritaires") |
|
|
|
|
// Text(federalClub.acronym) |
|
|
|
|
// } |
|
|
|
|
// Divider() |
|
|
|
|
// } else { |
|
|
|
|
// NavigationLink { |
|
|
|
|
// ClubsView() { club in |
|
|
|
|
// if let event = tournament.eventObject() { |
|
|
|
|
// event.club = club.id |
|
|
|
|
// do { |
|
|
|
|
// try dataStore.events.addOrUpdate(instance: event) |
|
|
|
|
// } catch { |
|
|
|
|
// Logger.error(error) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// _save() |
|
|
|
|
// } |
|
|
|
|
// } label: { |
|
|
|
|
// Text("Identifier le club") |
|
|
|
|
// } |
|
|
|
|
// Divider() |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
private func _teamFooterView(_ team: TeamRegistration) -> some View { |
|
|
|
|
HStack { |
|
|
|
|
|