### feat: erweitere und optimiere Online-Nennformular
Some checks failed
Some checks failed
- **Display:** Link zur Nennungs-URL nur für Desktop hinzugefügt. - **Inputs:** Unterstütze `singleLine` in allen Texteingabefeldern. - **UX:** Hinzufügen von `ImeAction.Done` für Bemerkungen mit direkter Verarbeitung bei Abschluss.
This commit is contained in:
parent
568d9dbb32
commit
f2a6078421
|
|
@ -213,6 +213,16 @@ fun OnlineNennungFormular(
|
||||||
fontWeight = FontWeight.ExtraBold,
|
fontWeight = FontWeight.ExtraBold,
|
||||||
color = AppColors.Primary
|
color = AppColors.Primary
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (!isMobile) {
|
||||||
|
Text(
|
||||||
|
text = "https://nennung.mo-code.at/#/nennung/$turnierNr",
|
||||||
|
style = MaterialTheme.typography.labelMedium,
|
||||||
|
color = AppColors.Primary.copy(alpha = 0.6f),
|
||||||
|
modifier = Modifier.padding(bottom = 4.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Turnier-Nr: $turnierNr | Datum: ${if (turnierNr == "26128") "25. April 2026" else "26. April 2026"}",
|
text = "Turnier-Nr: $turnierNr | Datum: ${if (turnierNr == "26128") "25. April 2026" else "26. April 2026"}",
|
||||||
style = MaterialTheme.typography.titleMedium,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
|
|
@ -230,6 +240,7 @@ fun OnlineNennungFormular(
|
||||||
label = { Text("Vorname*") },
|
label = { Text("Vorname*") },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
@ -239,6 +250,7 @@ fun OnlineNennungFormular(
|
||||||
label = { Text("Nachname*") },
|
label = { Text("Nachname*") },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
@ -250,6 +262,7 @@ fun OnlineNennungFormular(
|
||||||
label = { Text("Vorname*") },
|
label = { Text("Vorname*") },
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
@ -259,6 +272,7 @@ fun OnlineNennungFormular(
|
||||||
label = { Text("Nachname*") },
|
label = { Text("Nachname*") },
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
@ -272,6 +286,7 @@ fun OnlineNennungFormular(
|
||||||
isError = email.isNotEmpty() && !isEmailValid,
|
isError = email.isNotEmpty() && !isEmailValid,
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email, imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email, imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
@ -282,6 +297,7 @@ fun OnlineNennungFormular(
|
||||||
label = { Text("Telefon-Nr.") },
|
label = { Text("Telefon-Nr.") },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Phone, imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Phone, imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
@ -294,8 +310,9 @@ fun OnlineNennungFormular(
|
||||||
label = { Text("Pferdename / Kopfnummer*") },
|
label = { Text("Pferdename / Kopfnummer*") },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||||
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Down) })
|
keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) })
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(8.dp))
|
Spacer(Modifier.height(8.dp))
|
||||||
|
|
@ -370,7 +387,24 @@ fun OnlineNennungFormular(
|
||||||
placeholder = { Text("z.B. Startzeit-Wünsche, Stallnachbarn...") },
|
placeholder = { Text("z.B. Startzeit-Wünsche, Stallnachbarn...") },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
minLines = 3,
|
minLines = 3,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(12.dp),
|
||||||
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
|
||||||
|
keyboardActions = KeyboardActions(onDone = {
|
||||||
|
if (canSubmit) {
|
||||||
|
val payload = NennungPayload(
|
||||||
|
vorname = vorname,
|
||||||
|
nachname = nachname,
|
||||||
|
lizenz = "N/A",
|
||||||
|
pferdName = pferdName,
|
||||||
|
pferdAlter = "N/A",
|
||||||
|
email = email,
|
||||||
|
telefon = telefon,
|
||||||
|
bewerbe = ausgewaehlteBewerbe.toList(),
|
||||||
|
bemerkungen = bemerkungen
|
||||||
|
)
|
||||||
|
onNennenAbgeschickt(payload)
|
||||||
|
}
|
||||||
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(24.dp))
|
Spacer(Modifier.height(24.dp))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user