|
|
|
@ -110,6 +110,13 @@ struct ClubSearchView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.task { |
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
try dataStore.clubs.loadDataFromServerIfAllowed() |
|
|
|
|
|
|
|
} catch { |
|
|
|
|
|
|
|
Logger.error(error) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
.listStyle(.grouped) |
|
|
|
.listStyle(.grouped) |
|
|
|
.onChange(of: searchPresented) { |
|
|
|
.onChange(of: searchPresented) { |
|
|
|
locationManager.lastError = nil |
|
|
|
locationManager.lastError = nil |
|
|
|
@ -288,13 +295,13 @@ struct ClubSearchView: View { |
|
|
|
private func _importClub(clubToEdit: Club, clubMarker: ClubMarker) { |
|
|
|
private func _importClub(clubToEdit: Club, clubMarker: ClubMarker) { |
|
|
|
if clubToEdit.creator == dataStore.user.id { |
|
|
|
if clubToEdit.creator == dataStore.user.id { |
|
|
|
if clubToEdit.name.isEmpty { |
|
|
|
if clubToEdit.name.isEmpty { |
|
|
|
clubToEdit.name = clubMark.nom |
|
|
|
clubToEdit.name = clubMarker.nom |
|
|
|
clubToEdit.acronym = clubToEdit.automaticShortName() |
|
|
|
clubToEdit.acronym = clubToEdit.automaticShortName() |
|
|
|
} |
|
|
|
} |
|
|
|
clubToEdit.code = clubMark.clubID |
|
|
|
clubToEdit.code = clubMarker.clubID |
|
|
|
clubToEdit.latitude = clubMark.lat |
|
|
|
clubToEdit.latitude = clubMarker.lat |
|
|
|
clubToEdit.longitude = clubMark.lng |
|
|
|
clubToEdit.longitude = clubMarker.lng |
|
|
|
clubToEdit.city = clubMark.ville |
|
|
|
clubToEdit.city = clubMarker.ville |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if displayContext == .addition { |
|
|
|
if displayContext == .addition { |
|
|
|
|