|
|
|
@ -43,6 +43,7 @@ struct ClubDetailView: View { |
|
|
|
dataStore.user.clubs.append(club.id) |
|
|
|
dataStore.user.clubs.append(club.id) |
|
|
|
} |
|
|
|
} |
|
|
|
self.dataStore.saveUser() |
|
|
|
self.dataStore.saveUser() |
|
|
|
|
|
|
|
dismiss() |
|
|
|
} |
|
|
|
} |
|
|
|
} footer: { |
|
|
|
} footer: { |
|
|
|
if displayContext == .lockedForEditing { |
|
|
|
if displayContext == .lockedForEditing { |
|
|
|
@ -52,7 +53,7 @@ struct ClubDetailView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
Section { |
|
|
|
TextField("Nom du club", text: $club.name) |
|
|
|
TextField("Nom du club (4 lettres mini)", text: $club.name) |
|
|
|
.autocorrectionDisabled() |
|
|
|
.autocorrectionDisabled() |
|
|
|
.keyboardType(.alphabet) |
|
|
|
.keyboardType(.alphabet) |
|
|
|
.frame(maxWidth: .infinity) |
|
|
|
.frame(maxWidth: .infinity) |
|
|
|
@ -186,31 +187,6 @@ struct ClubDetailView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if displayContext == .addition { |
|
|
|
|
|
|
|
Section { |
|
|
|
|
|
|
|
} header: { |
|
|
|
|
|
|
|
HStack { |
|
|
|
|
|
|
|
VStack { |
|
|
|
|
|
|
|
Divider() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Text("ou") |
|
|
|
|
|
|
|
VStack { |
|
|
|
|
|
|
|
Divider() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
|
|
|
NavigationLink { |
|
|
|
|
|
|
|
ClubSearchView(displayContext: .edition, club: club) |
|
|
|
|
|
|
|
} label: { |
|
|
|
|
|
|
|
Label("Chercher dans la base fédérale", systemImage: "magnifyingglass") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} footer: { |
|
|
|
|
|
|
|
Text("Vous pouvez chercher un club dans la base fédérale et importer les informations directement.") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClubCourtSetupView(club: club, displayContext: displayContext, selectedCourt: $selectedCourt, hideLockForEditingMessage: true) |
|
|
|
ClubCourtSetupView(club: club, displayContext: displayContext, selectedCourt: $selectedCourt, hideLockForEditingMessage: true) |
|
|
|
|
|
|
|
|
|
|
|
if displayContext == .edition { |
|
|
|
if displayContext == .edition { |
|
|
|
|