### 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:
+10
-1
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user