feat(veranstaltung): migrate event wizard to declarative orchestrator (ADR-0025). Transferred logic from EventFlowSample to EventWizardFlow. Renamed Demo* components to EventWizard*. Added OETO-compliant steps: TurnierKonfiguration, BewerbKonfiguration, AbteilungKonfiguration, Summary. Updated DSL flow to include full sequential path. --trailer "Co-authored-by: Junie <junie@jetbrains.com>"
This commit is contained in:
@@ -35,6 +35,7 @@ kotlin {
|
||||
implementation(projects.frontend.core.navigation)
|
||||
implementation(projects.frontend.features.billingFeature)
|
||||
implementation(projects.frontend.features.nennungFeature)
|
||||
implementation(projects.frontend.core.wizard)
|
||||
implementation(projects.core.znsParser)
|
||||
|
||||
implementation(compose.foundation)
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package at.mocode.frontend.features.turnier.wizard
|
||||
|
||||
import at.mocode.core.domain.model.ReglementE
|
||||
import at.mocode.core.domain.model.SparteE
|
||||
import at.mocode.core.domain.model.TurnierkategorieE
|
||||
import at.mocode.frontend.core.wizard.dsl.flow
|
||||
import at.mocode.frontend.core.wizard.runtime.StepId
|
||||
|
||||
/**
|
||||
* Definiert die Schritte für den Turnier-Anlage-Wizard.
|
||||
* Orientiert sich an der ÖTO-Logik und dem SCS-Rahmen.
|
||||
*/
|
||||
sealed interface TurnierAnlageStep : StepId {
|
||||
/** 1. Basisdaten (Name, Nummer, Datum, Sparte) */
|
||||
data object Basisdaten : TurnierAnlageStep
|
||||
/** 2. Kategorie & Reglement (CSN-C, CDN, etc. / ÖTO vs FEI) */
|
||||
data object KategorieReglement : TurnierAnlageStep
|
||||
/** 3. Funktionäre (TB, Parcoursbauer, etc.) */
|
||||
data object Funktionaere : TurnierAnlageStep
|
||||
/** 4. Nenn-Konfiguration (Nennschluss, Gebühren, Tauschbörse) */
|
||||
data object NennKonfig : TurnierAnlageStep
|
||||
/** 5. Zusammenfassung & Validierung (ÖTO-Warnungen prüfen) */
|
||||
data object Summary : TurnierAnlageStep
|
||||
}
|
||||
|
||||
/**
|
||||
* Accumulator für den Turnier-Wizard.
|
||||
* Sammelt die Daten, bevor sie als [DomTurnier] ans Backend gesendet werden.
|
||||
*/
|
||||
data class TurnierAnlageAcc(
|
||||
val name: String = "",
|
||||
val turnierNummer: String = "",
|
||||
val sparte: SparteE = SparteE.SPRINGEN,
|
||||
val kategorie: TurnierkategorieE = TurnierkategorieE.C,
|
||||
val reglement: ReglementE = ReglementE.OETO,
|
||||
val datum: String? = null, // ISO LocalDate
|
||||
val tbId: String? = null,
|
||||
val pbId: String? = null,
|
||||
val nennschluss: String? = null, // ISO Instant
|
||||
val nachnenngebuehrVerlangt: Boolean = false,
|
||||
val nenntauschboerseAktiv: Boolean = false
|
||||
)
|
||||
|
||||
/**
|
||||
* Der Wizard-Flow für die Turnier-Anlage.
|
||||
*/
|
||||
val TurnierAnlageFlow = flow<TurnierAnlageStep, TurnierAnlageAcc>(start = TurnierAnlageStep.Basisdaten) {
|
||||
step(TurnierAnlageStep.Basisdaten) {
|
||||
otherwise(TurnierAnlageStep.KategorieReglement)
|
||||
}
|
||||
step(TurnierAnlageStep.KategorieReglement) {
|
||||
otherwise(TurnierAnlageStep.Funktionaere)
|
||||
}
|
||||
step(TurnierAnlageStep.Funktionaere) {
|
||||
otherwise(TurnierAnlageStep.NennKonfig)
|
||||
}
|
||||
step(TurnierAnlageStep.NennKonfig) {
|
||||
otherwise(TurnierAnlageStep.Summary)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user