refactor(desktop): V2-Suffixe entfernt und VeranstaltungKomponenten modularisiert
Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -12,13 +12,13 @@ import at.mocode.frontend.core.localdb.localDbModule
|
||||
import at.mocode.frontend.core.network.networkModule
|
||||
import at.mocode.frontend.core.sync.di.syncModule
|
||||
import at.mocode.frontend.features.billing.di.billingModule
|
||||
import at.mocode.frontend.features.profile.di.profileModule
|
||||
import at.mocode.frontend.features.verein.di.vereinFeatureModule
|
||||
import at.mocode.frontend.features.nennung.di.nennungFeatureModule
|
||||
import at.mocode.frontend.features.pferde.di.pferdeModule
|
||||
import at.mocode.frontend.features.profile.di.profileModule
|
||||
import at.mocode.frontend.features.reiter.di.reiterModule
|
||||
import at.mocode.turnier.feature.di.turnierFeatureModule
|
||||
import at.mocode.frontend.features.verein.di.vereinFeatureModule
|
||||
import at.mocode.ping.feature.di.pingFeatureModule
|
||||
import at.mocode.turnier.feature.di.turnierFeatureModule
|
||||
import at.mocode.zns.feature.di.znsImportModule
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.koin.core.context.GlobalContext
|
||||
@@ -48,7 +48,7 @@ fun main() = application {
|
||||
}
|
||||
println("[DesktopApp] KOIN initialisiert")
|
||||
// Testdaten für Prototyp laden
|
||||
at.mocode.desktop.v2.StoreV2.seed()
|
||||
at.mocode.desktop.v2.Store.seed()
|
||||
} catch (e: Exception) {
|
||||
println("[DesktopApp] Koin-Warnung: ${e.message}")
|
||||
}
|
||||
|
||||
+19
-19
@@ -660,7 +660,7 @@ private fun DesktopContentArea(
|
||||
is AppScreen.VeranstaltungKonfig -> {
|
||||
val vId = currentScreen.veranstalterId
|
||||
// Falls vId == 0, kommen wir aus der Gesamtübersicht und wählen erst im Wizard
|
||||
at.mocode.desktop.v2.VeranstaltungKonfigV2(
|
||||
at.mocode.desktop.v2.VeranstaltungKonfig(
|
||||
veranstalterId = vId,
|
||||
onBack = onBack,
|
||||
onSaved = { evtId, finalVId -> onNavigate(AppScreen.VeranstaltungProfil(finalVId, evtId)) },
|
||||
@@ -671,12 +671,12 @@ private fun DesktopContentArea(
|
||||
is AppScreen.VeranstaltungProfil -> {
|
||||
val vId = currentScreen.veranstalterId
|
||||
val evtId = currentScreen.veranstaltungId
|
||||
if (at.mocode.desktop.v2.StoreV2.vereine.none { it.id == vId }) {
|
||||
if (at.mocode.desktop.v2.Store.vereine.none { it.id == vId }) {
|
||||
InvalidContextNotice(
|
||||
message = "Veranstalter (ID=$vId) nicht gefunden.",
|
||||
onBack = onBack
|
||||
)
|
||||
} else if (at.mocode.desktop.v2.StoreV2.eventsFor(vId).none { it.id == evtId }) {
|
||||
} else if (at.mocode.desktop.v2.Store.eventsFor(vId).none { it.id == evtId }) {
|
||||
InvalidContextNotice(
|
||||
message = "Veranstaltung (ID=$evtId) gehört nicht zu Veranstalter #$vId.",
|
||||
onBack = onBack
|
||||
@@ -687,17 +687,17 @@ private fun DesktopContentArea(
|
||||
veranstaltungId = evtId,
|
||||
onBack = onBack,
|
||||
onTurnierNeu = {
|
||||
val veranstaltung = at.mocode.desktop.v2.StoreV2.eventsFor(vId).firstOrNull { it.id == evtId }
|
||||
val list = at.mocode.desktop.v2.TurnierStoreV2.list(evtId)
|
||||
val veranstaltung = at.mocode.desktop.v2.Store.eventsFor(vId).firstOrNull { it.id == evtId }
|
||||
val list = at.mocode.desktop.v2.TurnierStore.list(evtId)
|
||||
val newId = (list.maxOfOrNull { it.id } ?: 0L) + 1L
|
||||
val draft = at.mocode.desktop.v2.TurnierV2(
|
||||
val draft = at.mocode.desktop.v2.Turnier(
|
||||
id = newId,
|
||||
veranstaltungId = evtId,
|
||||
turnierNr = 0,
|
||||
datumVon = veranstaltung?.datumVon ?: "",
|
||||
datumBis = veranstaltung?.datumBis,
|
||||
)
|
||||
at.mocode.desktop.v2.TurnierStoreV2.add(evtId, draft)
|
||||
at.mocode.desktop.v2.TurnierStore.add(evtId, draft)
|
||||
onNavigate(AppScreen.TurnierDetail(evtId, newId))
|
||||
},
|
||||
onTurnierOpen = { tId -> onNavigate(AppScreen.TurnierDetail(evtId, tId)) },
|
||||
@@ -711,21 +711,21 @@ private fun DesktopContentArea(
|
||||
veranstaltungId = currentScreen.id,
|
||||
onBack = onBack,
|
||||
onTurnierNeu = {
|
||||
val v = at.mocode.desktop.v2.StoreV2.vereine.firstOrNull { vv ->
|
||||
at.mocode.desktop.v2.StoreV2.eventsFor(vv.id).any { it.id == currentScreen.id }
|
||||
val v = at.mocode.desktop.v2.Store.vereine.firstOrNull { vv ->
|
||||
at.mocode.desktop.v2.Store.eventsFor(vv.id).any { it.id == currentScreen.id }
|
||||
}
|
||||
val veranstaltung =
|
||||
v?.let { at.mocode.desktop.v2.StoreV2.eventsFor(it.id).firstOrNull { e -> e.id == currentScreen.id } }
|
||||
val list = at.mocode.desktop.v2.TurnierStoreV2.list(currentScreen.id)
|
||||
v?.let { at.mocode.desktop.v2.Store.eventsFor(it.id).firstOrNull { e -> e.id == currentScreen.id } }
|
||||
val list = at.mocode.desktop.v2.TurnierStore.list(currentScreen.id)
|
||||
val newId = (list.maxOfOrNull { it.id } ?: 0L) + 1L
|
||||
val draft = at.mocode.desktop.v2.TurnierV2(
|
||||
val draft = at.mocode.desktop.v2.Turnier(
|
||||
id = newId,
|
||||
veranstaltungId = currentScreen.id,
|
||||
turnierNr = 0,
|
||||
datumVon = veranstaltung?.datumVon ?: "",
|
||||
datumBis = veranstaltung?.datumBis,
|
||||
)
|
||||
at.mocode.desktop.v2.TurnierStoreV2.add(currentScreen.id, draft)
|
||||
at.mocode.desktop.v2.TurnierStore.add(currentScreen.id, draft)
|
||||
onNavigate(AppScreen.TurnierDetail(currentScreen.id, newId))
|
||||
},
|
||||
onTurnierOeffnen = { tid -> onNavigate(AppScreen.TurnierDetail(currentScreen.id, tid)) },
|
||||
@@ -739,8 +739,8 @@ private fun DesktopContentArea(
|
||||
// Turnier-Screens
|
||||
is AppScreen.TurnierDetail -> {
|
||||
val evtId = currentScreen.veranstaltungId
|
||||
val parent = at.mocode.desktop.v2.StoreV2.vereine.firstOrNull { v ->
|
||||
at.mocode.desktop.v2.StoreV2.eventsFor(v.id).any { it.id == evtId }
|
||||
val parent = at.mocode.desktop.v2.Store.vereine.firstOrNull { v ->
|
||||
at.mocode.desktop.v2.Store.eventsFor(v.id).any { it.id == evtId }
|
||||
}
|
||||
if (parent == null) {
|
||||
InvalidContextNotice(
|
||||
@@ -748,7 +748,7 @@ private fun DesktopContentArea(
|
||||
onBack = onBack
|
||||
)
|
||||
} else {
|
||||
val veranstaltung = at.mocode.desktop.v2.StoreV2.eventsFor(parent.id).firstOrNull { it.id == evtId }
|
||||
val veranstaltung = at.mocode.desktop.v2.Store.eventsFor(parent.id).firstOrNull { it.id == evtId }
|
||||
val blCode = parent.oepsNummer.split("-").getOrNull(1) ?: ""
|
||||
val bundesland = mapOepsToBundesland(blCode)
|
||||
TurnierDetailScreen(
|
||||
@@ -769,8 +769,8 @@ private fun DesktopContentArea(
|
||||
is AppScreen.TurnierNeu -> {
|
||||
val evtId = currentScreen.veranstaltungId
|
||||
// V2: Wir erlauben Turnier-Nr nur, wenn die Veranstaltung im V2-Store existiert
|
||||
val parent = at.mocode.desktop.v2.StoreV2.vereine.firstOrNull { v ->
|
||||
at.mocode.desktop.v2.StoreV2.eventsFor(v.id).any { it.id == evtId }
|
||||
val parent = at.mocode.desktop.v2.Store.vereine.firstOrNull { v ->
|
||||
at.mocode.desktop.v2.Store.eventsFor(v.id).any { it.id == evtId }
|
||||
}
|
||||
if (parent == null) {
|
||||
InvalidContextNotice(
|
||||
@@ -778,7 +778,7 @@ private fun DesktopContentArea(
|
||||
onBack = onBack
|
||||
)
|
||||
} else {
|
||||
at.mocode.desktop.v2.TurnierWizardV2(
|
||||
at.mocode.desktop.v2.TurnierWizard(
|
||||
veranstalterId = parent.id,
|
||||
veranstaltungId = evtId,
|
||||
onBack = onBack,
|
||||
|
||||
+13
-11
@@ -6,9 +6,11 @@ import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.filled.*
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.material.icons.filled.Delete
|
||||
import androidx.compose.material.icons.filled.Edit
|
||||
import androidx.compose.material.icons.filled.Search
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
@@ -140,7 +142,7 @@ data class TableColumn<T>(
|
||||
|
||||
@Composable
|
||||
fun PferdeVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
val pferde = StoreV2.pferde
|
||||
val pferde = Store.pferde
|
||||
var filter by remember { mutableStateOf("") }
|
||||
val filteredItems = if (filter.isEmpty()) pferde else pferde.filter {
|
||||
it.name.contains(filter, ignoreCase = true) || it.feiId?.contains(filter, ignoreCase = true) == true
|
||||
@@ -162,14 +164,14 @@ fun PferdeVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
onBack = onBack,
|
||||
onNew = { /* CRUD Logik */ },
|
||||
onEdit = { onEdit(it.id) },
|
||||
onDelete = { StoreV2.pferde.remove(it) },
|
||||
onDelete = { Store.pferde.remove(it) },
|
||||
onSearch = { filter = it }
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ReiterVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
val reiter = StoreV2.reiter
|
||||
val reiter = Store.reiter
|
||||
var filter by remember { mutableStateOf("") }
|
||||
val filteredItems = if (filter.isEmpty()) reiter else reiter.filter {
|
||||
it.vorname.contains(filter, ignoreCase = true) || it.nachname.contains(
|
||||
@@ -192,14 +194,14 @@ fun ReiterVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
onBack = onBack,
|
||||
onNew = { },
|
||||
onEdit = { onEdit(it.id) },
|
||||
onDelete = { StoreV2.reiter.remove(it) },
|
||||
onDelete = { Store.reiter.remove(it) },
|
||||
onSearch = { filter = it }
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun VereinVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
val vereine = StoreV2.vereine
|
||||
val vereine = Store.vereine
|
||||
var filter by remember { mutableStateOf("") }
|
||||
val filteredItems = if (filter.isEmpty()) vereine else vereine.filter {
|
||||
it.name.contains(filter, ignoreCase = true) || it.oepsNummer.contains(filter, ignoreCase = true)
|
||||
@@ -218,14 +220,14 @@ fun VereinVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
onBack = onBack,
|
||||
onNew = { },
|
||||
onEdit = { onEdit(it.id) },
|
||||
onDelete = { StoreV2.vereine.remove(it) },
|
||||
onDelete = { Store.vereine.remove(it) },
|
||||
onSearch = { filter = it }
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun FunktionaerVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
val funktionaere = StoreV2.funktionaere
|
||||
val funktionaere = Store.funktionaere
|
||||
var filter by remember { mutableStateOf("") }
|
||||
val filteredItems = if (filter.isEmpty()) funktionaere else funktionaere.filter {
|
||||
it.vorname.contains(filter, ignoreCase = true) || it.nachname.contains(filter, ignoreCase = true)
|
||||
@@ -244,7 +246,7 @@ fun FunktionaerVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
onBack = onBack,
|
||||
onNew = { },
|
||||
onEdit = { onEdit(it.id) },
|
||||
onDelete = { StoreV2.funktionaere.remove(it) },
|
||||
onDelete = { Store.funktionaere.remove(it) },
|
||||
onSearch = { filter = it }
|
||||
)
|
||||
}
|
||||
@@ -253,7 +255,7 @@ fun FunktionaerVerwaltungScreen(onBack: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
fun VeranstalterVerwaltungScreen(onBack: () -> Unit, onNew: () -> Unit, onEdit: (Long) -> Unit) {
|
||||
// Veranstalter sind in unserem System eigentlich Vereine, die Veranstaltungen ausrichten
|
||||
// Wir nutzen hier die 'vereine' Liste aus dem Store.
|
||||
val vereine = StoreV2.vereine
|
||||
val vereine = Store.vereine
|
||||
var filter by remember { mutableStateOf("") }
|
||||
val filteredItems = if (filter.isEmpty()) vereine else vereine.filter {
|
||||
it.name.contains(filter, ignoreCase = true) || it.oepsNummer.contains(filter, ignoreCase = true)
|
||||
|
||||
+9
-9
@@ -431,7 +431,7 @@ fun OnboardingScreenPreview() {
|
||||
@Composable
|
||||
fun PferdProfilV2(id: Long, onBack: () -> Unit) {
|
||||
DesktopThemeV2 {
|
||||
val pferd = remember(id) { StoreV2.pferde.firstOrNull { it.id == id } }
|
||||
val pferd = remember(id) { Store.pferde.firstOrNull { it.id == id } }
|
||||
if (pferd == null) {
|
||||
Text("Pferd nicht gefunden"); return@DesktopThemeV2
|
||||
}
|
||||
@@ -506,7 +506,7 @@ fun PferdProfilV2(id: Long, onBack: () -> Unit) {
|
||||
@Composable
|
||||
fun ReiterProfilV2(id: Long, onBack: () -> Unit) {
|
||||
DesktopThemeV2 {
|
||||
val r = remember(id) { StoreV2.reiter.firstOrNull { it.id == id } }
|
||||
val r = remember(id) { Store.reiter.firstOrNull { it.id == id } }
|
||||
if (r == null) {
|
||||
Text("Reiter nicht gefunden"); return@DesktopThemeV2
|
||||
}
|
||||
@@ -590,7 +590,7 @@ fun ReiterProfilV2(id: Long, onBack: () -> Unit) {
|
||||
@Composable
|
||||
fun VereinProfilV2(id: Long, onBack: () -> Unit) {
|
||||
DesktopThemeV2 {
|
||||
val v = remember(id) { StoreV2.vereine.firstOrNull { it.id == id } }
|
||||
val v = remember(id) { Store.vereine.firstOrNull { it.id == id } }
|
||||
if (v == null) {
|
||||
Text("Verein nicht gefunden"); return@DesktopThemeV2
|
||||
}
|
||||
@@ -681,7 +681,7 @@ fun VereinProfilV2(id: Long, onBack: () -> Unit) {
|
||||
@Composable
|
||||
fun FunktionaerProfilV2(id: Long, onBack: () -> Unit) {
|
||||
DesktopThemeV2 {
|
||||
val f = remember(id) { StoreV2.funktionaere.firstOrNull { it.id == id } }
|
||||
val f = remember(id) { Store.funktionaere.firstOrNull { it.id == id } }
|
||||
if (f == null) {
|
||||
Text("Funktionär nicht gefunden"); return@DesktopThemeV2
|
||||
}
|
||||
@@ -782,7 +782,7 @@ fun VeranstalterAuswahlV2(
|
||||
var selectedId by remember { mutableStateOf<Long?>(null) }
|
||||
|
||||
LazyColumn(Modifier.fillMaxSize()) {
|
||||
items(StoreV2.vereine) { v ->
|
||||
items(Store.vereine) { v ->
|
||||
val sel = selectedId == v.id
|
||||
Card(
|
||||
modifier = Modifier
|
||||
@@ -822,14 +822,14 @@ fun VeranstalterDetailV2(
|
||||
Icons.AutoMirrored.Filled.ArrowBack,
|
||||
contentDescription = "Zurück",
|
||||
modifier = Modifier.clickable { onBack() })
|
||||
val verein = StoreV2.vereine.firstOrNull { it.id == veranstalterId }
|
||||
val verein = Store.vereine.firstOrNull { it.id == veranstalterId }
|
||||
Text(verein?.name ?: "Veranstalter", style = MaterialTheme.typography.titleLarge)
|
||||
Spacer(Modifier.weight(1f))
|
||||
Button(onClick = onNeuVeranstaltung) { Text("+ Neue Veranstaltung") }
|
||||
}
|
||||
|
||||
// Veranstalter Vorschau-Karte mit Bearbeiten-Dialog
|
||||
val verein = remember(veranstalterId) { StoreV2.vereine.firstOrNull { it.id == veranstalterId } }
|
||||
val verein = remember(veranstalterId) { Store.vereine.firstOrNull { it.id == veranstalterId } }
|
||||
if (verein != null) {
|
||||
var editOpen by remember { mutableStateOf(false) }
|
||||
Card(Modifier.fillMaxWidth()) {
|
||||
@@ -953,7 +953,7 @@ fun VeranstalterDetailV2(
|
||||
}
|
||||
}
|
||||
|
||||
val events = StoreV2.eventsFor(veranstalterId)
|
||||
val events = Store.eventsFor(veranstalterId)
|
||||
// Filter-/Suchmaske
|
||||
var search by remember { mutableStateOf("") }
|
||||
OutlinedTextField(
|
||||
@@ -992,7 +992,7 @@ fun VeranstalterDetailV2(
|
||||
onDismissRequest = { confirm = false },
|
||||
confirmButton = {
|
||||
TextButton(onClick = {
|
||||
StoreV2.removeEvent(veranstalterId, evt.id)
|
||||
Store.removeEvent(veranstalterId, evt.id)
|
||||
confirm = false
|
||||
}) { Text("Löschen") }
|
||||
},
|
||||
|
||||
+15
-15
@@ -71,7 +71,7 @@ data class Funktionaer(
|
||||
var istAktiv: Boolean = true,
|
||||
)
|
||||
|
||||
data class VeranstaltungV2(
|
||||
data class Veranstaltung(
|
||||
val id: Long,
|
||||
var veranstalterId: Long,
|
||||
var titel: String,
|
||||
@@ -85,7 +85,7 @@ data class VeranstaltungV2(
|
||||
var sponsoren: SnapshotStateList<String> = mutableStateListOf(),
|
||||
)
|
||||
|
||||
object StoreV2 {
|
||||
object Store {
|
||||
val pferde: SnapshotStateList<Pferd> = mutableStateListOf(
|
||||
Pferd(
|
||||
id = 1,
|
||||
@@ -268,7 +268,7 @@ object StoreV2 {
|
||||
return id
|
||||
}
|
||||
|
||||
private val veranstaltungen: MutableMap<Long, SnapshotStateList<VeranstaltungV2>> = mutableMapOf()
|
||||
private val veranstaltungen: MutableMap<Long, SnapshotStateList<Veranstaltung>> = mutableMapOf()
|
||||
|
||||
fun seed() {
|
||||
// Falls bereits Daten da sind (außer den statischen Vereinen), nichts tun
|
||||
@@ -277,7 +277,7 @@ object StoreV2 {
|
||||
// 1. Neumarkt April 2026 (ID 100)
|
||||
val neumarktId = 100L
|
||||
addEventFirst(
|
||||
1, VeranstaltungV2(
|
||||
1, Veranstaltung(
|
||||
id = neumarktId,
|
||||
veranstalterId = 1,
|
||||
titel = "CSN-B* Neumarkt am Wallersee",
|
||||
@@ -289,17 +289,17 @@ object StoreV2 {
|
||||
)
|
||||
)
|
||||
|
||||
TurnierStoreV2.add(
|
||||
TurnierStore.add(
|
||||
neumarktId,
|
||||
TurnierV2(101, neumarktId, 26128, datumVon = "2026-04-24", datumBis = "2026-04-26", znsDataLoaded = true).apply {
|
||||
Turnier(101, neumarktId, 26128, datumVon = "2026-04-24", datumBis = "2026-04-26", znsDataLoaded = true).apply {
|
||||
titel = "Springturnier Neumarkt"
|
||||
kategorie.add("CSN-B*")
|
||||
kategorie.add("CSNP-B")
|
||||
}
|
||||
)
|
||||
TurnierStoreV2.add(
|
||||
TurnierStore.add(
|
||||
neumarktId,
|
||||
TurnierV2(102, neumarktId, 26129, datumVon = "2026-04-24", datumBis = "2026-04-26", znsDataLoaded = true).apply {
|
||||
Turnier(102, neumarktId, 26129, datumVon = "2026-04-24", datumBis = "2026-04-26", znsDataLoaded = true).apply {
|
||||
titel = "Dressurturnier Neumarkt"
|
||||
kategorie.add("CDN-B")
|
||||
kategorie.add("CDNP-B")
|
||||
@@ -309,7 +309,7 @@ object StoreV2 {
|
||||
// 2. Linz 2026 (ID 200)
|
||||
val linzId = 200L
|
||||
addEventFirst(
|
||||
2, VeranstaltungV2(
|
||||
2, Veranstaltung(
|
||||
id = linzId,
|
||||
veranstalterId = 2,
|
||||
titel = "Linzer Pferdefestival",
|
||||
@@ -319,15 +319,15 @@ object StoreV2 {
|
||||
beschreibung = "Große Reitsport-Veranstaltung am Ebelsberger Schlosspark."
|
||||
)
|
||||
)
|
||||
TurnierStoreV2.add(
|
||||
TurnierStore.add(
|
||||
linzId,
|
||||
TurnierV2(201, linzId, 26500, datumVon = "2026-05-20", datumBis = "2026-05-24", znsDataLoaded = true).apply {
|
||||
Turnier(201, linzId, 26500, datumVon = "2026-05-20", datumBis = "2026-05-24", znsDataLoaded = true).apply {
|
||||
kategorie.add("CSN-B*")
|
||||
})
|
||||
|
||||
// 3. Ein historisches Event (ID 300)
|
||||
addEventFirst(
|
||||
1, VeranstaltungV2(
|
||||
1, Veranstaltung(
|
||||
id = 300L,
|
||||
veranstalterId = 1,
|
||||
titel = "Herbst-Turnier 2025",
|
||||
@@ -338,10 +338,10 @@ object StoreV2 {
|
||||
)
|
||||
}
|
||||
|
||||
fun eventsFor(vereinId: Long): SnapshotStateList<VeranstaltungV2> =
|
||||
fun eventsFor(vereinId: Long): SnapshotStateList<Veranstaltung> =
|
||||
veranstaltungen.getOrPut(vereinId) { mutableStateListOf() }
|
||||
|
||||
fun addEventFirst(vereinId: Long, v: VeranstaltungV2) {
|
||||
fun addEventFirst(vereinId: Long, v: Veranstaltung) {
|
||||
eventsFor(vereinId).add(0, v)
|
||||
}
|
||||
|
||||
@@ -351,5 +351,5 @@ object StoreV2 {
|
||||
if (idx >= 0) list.removeAt(idx)
|
||||
}
|
||||
|
||||
fun allEvents(): List<VeranstaltungV2> = veranstaltungen.values.flatten()
|
||||
fun allEvents(): List<Veranstaltung> = veranstaltungen.values.flatten()
|
||||
}
|
||||
|
||||
+576
-454
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user