From f2a607842149e97c8a99d1ecf040a4945ef9e8ba Mon Sep 17 00:00:00 2001 From: StefanMoCoAt Date: Thu, 23 Apr 2026 05:18:16 +0200 Subject: [PATCH] ### feat: erweitere und optimiere Online-Nennformular MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **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. --- .../presentation/web/OnlineNennungFormular.kt | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/frontend/features/nennung-feature/src/commonMain/kotlin/at/mocode/frontend/features/nennung/presentation/web/OnlineNennungFormular.kt b/frontend/features/nennung-feature/src/commonMain/kotlin/at/mocode/frontend/features/nennung/presentation/web/OnlineNennungFormular.kt index ec6fe965..03e1684b 100644 --- a/frontend/features/nennung-feature/src/commonMain/kotlin/at/mocode/frontend/features/nennung/presentation/web/OnlineNennungFormular.kt +++ b/frontend/features/nennung-feature/src/commonMain/kotlin/at/mocode/frontend/features/nennung/presentation/web/OnlineNennungFormular.kt @@ -213,6 +213,16 @@ fun OnlineNennungFormular( fontWeight = FontWeight.ExtraBold, 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 = "Turnier-Nr: $turnierNr | Datum: ${if (turnierNr == "26128") "25. April 2026" else "26. April 2026"}", style = MaterialTheme.typography.titleMedium, @@ -230,6 +240,7 @@ fun OnlineNennungFormular( label = { Text("Vorname*") }, modifier = Modifier.fillMaxWidth(), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) @@ -239,6 +250,7 @@ fun OnlineNennungFormular( label = { Text("Nachname*") }, modifier = Modifier.fillMaxWidth(), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) @@ -250,6 +262,7 @@ fun OnlineNennungFormular( label = { Text("Vorname*") }, modifier = Modifier.weight(1f), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) @@ -259,6 +272,7 @@ fun OnlineNennungFormular( label = { Text("Nachname*") }, modifier = Modifier.weight(1f), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) @@ -272,6 +286,7 @@ fun OnlineNennungFormular( isError = email.isNotEmpty() && !isEmailValid, modifier = Modifier.fillMaxWidth(), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email, imeAction = ImeAction.Next), keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) @@ -282,6 +297,7 @@ fun OnlineNennungFormular( label = { Text("Telefon-Nr.") }, modifier = Modifier.fillMaxWidth(), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Phone, imeAction = ImeAction.Next), keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) @@ -294,8 +310,9 @@ fun OnlineNennungFormular( label = { Text("Pferdename / Kopfnummer*") }, modifier = Modifier.fillMaxWidth(), shape = RoundedCornerShape(12.dp), + singleLine = true, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), - keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Down) }) + keyboardActions = KeyboardActions(onNext = { focusManager.moveFocus(FocusDirection.Next) }) ) Spacer(Modifier.height(8.dp)) @@ -370,7 +387,24 @@ fun OnlineNennungFormular( placeholder = { Text("z.B. Startzeit-Wünsche, Stallnachbarn...") }, modifier = Modifier.fillMaxWidth(), 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))