### feat: erweitere Wizard- und UI-Logik

- Füge automatische Re-Evaluierung im `EventWizardViewModel` nach Import hinzu.
- Aktualisiere `StammdatenImportScreen` mit `onBack`-Callback für Status-Prüfung.
- Erweitere `PingScreen` im `ConnectivityCheck`-Screen um Navigation zum Login.
- Präzisiere `hasZns`-Guard mit Prüfung auf Import-Datum.
This commit is contained in:
2026-04-21 20:43:09 +02:00
parent bdb45eefe4
commit 92028d9e02
5 changed files with 62 additions and 5 deletions
@@ -20,7 +20,16 @@ data class DemoEventAcc(
)
object DemoEventGuards {
val hasZns: Guard<DemoEventStep, DemoEventAcc> = { ctx, _ -> (ctx.stats?.vereinCount ?: 0) > 0 }
val hasZns: Guard<DemoEventStep, DemoEventAcc> = { ctx, _ ->
val stats = ctx.stats
if (stats == null) false
else {
val hasData = stats.vereinCount > 0
// Einfache Frische-Prüfung: Falls lastImport gesetzt ist, sollte er vorhanden sein.
hasData && !stats.lastImport.isNullOrBlank()
}
}
// Heuristik für Demo: Kontaktperson nötig, wenn keine Veranstalter-ID vorhanden
// oder die Nummer ein Organisations-Präfix trägt (z. B. „ORG-“)
val needsContactPerson: Guard<DemoEventStep, DemoEventAcc> = { _, acc ->