|
|
|
|
@ -33,6 +33,8 @@ struct PlayerDetailView: View { |
|
|
|
|
var body: some View { |
|
|
|
|
Form { |
|
|
|
|
Section { |
|
|
|
|
Toggle("Joueur sur place", isOn: $player.hasArrived) |
|
|
|
|
|
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Nom", text: $player.lastName) |
|
|
|
|
.keyboardType(.alphabet) |
|
|
|
|
@ -102,10 +104,6 @@ struct PlayerDetailView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
Toggle("Joueur sur place", isOn: $player.hasArrived) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Licence", text: $licenceId) |
|
|
|
|
@ -119,9 +117,12 @@ struct PlayerDetailView: View { |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Licence") |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.licenceId?.strippedLicense) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Téléphone", text: $phoneNumber) |
|
|
|
|
.keyboardType(.namePhonePad) |
|
|
|
|
@ -134,9 +135,12 @@ struct PlayerDetailView: View { |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Téléphone") |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.phoneNumber) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Email", text: $email) |
|
|
|
|
.keyboardType(.emailAddress) |
|
|
|
|
@ -149,8 +153,9 @@ struct PlayerDetailView: View { |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Email") |
|
|
|
|
CopyPasteButtonView(pasteValue: player.email) |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.email) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ -177,6 +182,7 @@ struct PlayerDetailView: View { |
|
|
|
|
.navigationBarTitleDisplayMode(.inline) |
|
|
|
|
.toolbarBackground(.visible, for: .navigationBar) |
|
|
|
|
.toolbar { |
|
|
|
|
if focusedField == ._rank || focusedField == ._computedRank { |
|
|
|
|
ToolbarItem(placement: .keyboard) { |
|
|
|
|
Button("Valider") { |
|
|
|
|
if focusedField == ._rank { |
|
|
|
|
@ -192,6 +198,7 @@ struct PlayerDetailView: View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private func _save() { |
|
|
|
|
do { |
|
|
|
|
|