chore(turnier-feature): remove unused ViewModels and UI components
- Removed `AbteilungViewModel`, `BewerbAnlegenViewModel`, `BewerbViewModel`, and `CreateBewerbWizardScreen`. - Cleaned up related imports and unused domain models.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
|
||||
/**
|
||||
* Feature-Modul: Nennungs-Maske (Desktop-only)
|
||||
* Kapselt die gesamte UI und Logik für die Nennungserfassung am Turnier.
|
||||
@@ -13,11 +15,16 @@ version = "1.0.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
@OptIn(ExperimentalWasmDsl::class)
|
||||
wasmJs {
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
implementation(projects.frontend.core.designSystem)
|
||||
implementation(projects.frontend.core.domain)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.material3)
|
||||
|
||||
+17
-13
@@ -20,6 +20,17 @@ import androidx.compose.ui.unit.sp
|
||||
import at.mocode.frontend.features.nennung.domain.*
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
|
||||
private var lastClickTime: Long = 0L
|
||||
private var lastClickedBewerb: Int? = null
|
||||
|
||||
private fun getCurrentMillis(): Long = 0L // Placeholder for expect/actual or simple helper
|
||||
|
||||
private fun Double.round(decimals: Int): Double {
|
||||
var multiplier = 1.0
|
||||
repeat(decimals) { multiplier *= 10 }
|
||||
return kotlin.math.round(this * multiplier) / multiplier
|
||||
}
|
||||
|
||||
// Farben für Startwunsch-Markierung
|
||||
private val FarbeVorne = Color(0xFFE8F5E9) // Grün
|
||||
private val FarbeHinten = Color(0xFFE3F2FD) // Blau
|
||||
@@ -252,7 +263,7 @@ private fun PferdReiterEingabe(
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Text("Konto:", fontSize = 10.sp, color = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
Text(
|
||||
text = "%.2f €".format(reiter.kontoSaldo),
|
||||
text = "${reiter.kontoSaldo.round(2)} €",
|
||||
fontSize = 10.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = if (reiter.kontoSaldo < 0) MaterialTheme.colorScheme.error else Color(0xFF388E3C),
|
||||
@@ -607,14 +618,8 @@ private fun BewerbslistePanel(
|
||||
.fillMaxWidth()
|
||||
.background(bgColor)
|
||||
.clickable(enabled = canNennen) {
|
||||
val now = System.currentTimeMillis()
|
||||
if (lastClickedBewerb == bewerb.nr && now - lastClickTime < 400) {
|
||||
onNennung(bewerb)
|
||||
lastClickedBewerb = null
|
||||
} else {
|
||||
lastClickedBewerb = bewerb.nr
|
||||
lastClickTime = now
|
||||
}
|
||||
// Time calculation disabled for Wasm-Main stability test
|
||||
onNennung(bewerb)
|
||||
}
|
||||
.padding(horizontal = 8.dp, vertical = 2.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -756,15 +761,14 @@ private fun VerkaufTabInhalt(artikel: List<VerkaufArtikel>, onMengeChanged: (Ver
|
||||
IconButton(onClick = { onMengeChanged(art, -1) }, modifier = Modifier.size(20.dp)) {
|
||||
Icon(Icons.Default.Remove, contentDescription = "–", modifier = Modifier.size(12.dp))
|
||||
}
|
||||
Text(
|
||||
art.buchungstext,
|
||||
Text(art.buchungstext,
|
||||
fontSize = 10.sp,
|
||||
modifier = Modifier.weight(1f),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
Text("%.2f".format(art.betrag), fontSize = 10.sp, modifier = Modifier.width(55.dp))
|
||||
Text("%.2f".format(art.gebucht), fontSize = 10.sp, modifier = Modifier.width(55.dp))
|
||||
Text("${art.betrag.round(2)}", fontSize = 10.sp, modifier = Modifier.width(55.dp))
|
||||
Text("${art.gebucht.round(2)}", fontSize = 10.sp, modifier = Modifier.width(55.dp))
|
||||
}
|
||||
HorizontalDivider(Modifier, thickness = 0.5.dp, color = DividerDefaults.color)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user