WizardStepController
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Manages wizard state machine logic, step sequencing, and validation rules for the activity registration flow. Determines which steps are required based on the selected activity type and enforces Bufdir compliance constraints on mandatory fields. Coordinates between the UI layer and the draft store.
wizard-step-controller
Sources & reasoning
The mobile architecture section (line 296-298) explicitly lists the wizard as a named screen in the app. The WCAG dragging-movements rule (line 36) directly constrains its navigation pattern. Fase 1 / MVP in the roadmap section (line 405).
-
docs/source/likeperson.md ยท line 296-298Activity wizard (multi-step: contact โ date โ time โ duration โ summary)
-
docs/source/likeperson.md ยท line 36Tilbakeknapp fremfor sidelengs-sveip. Vertikal scroll er normen.
Responsibilities
- Maintain current step index and overall wizard session state
- Validate step data before allowing progression to the next step
- Determine step sequence dynamically based on activity type selection
- Invoke draft persistence on each successful step completion
- Assemble the final ActivityDraft payload and hand off to submission
Interfaces
initWizard(featureId: string): WizardSession
validateStep(step: WizardStep, data: Partial<ActivityDraft>): ValidationResult
advance(session: WizardSession, stepData: Partial<ActivityDraft>): WizardSession
retreat(session: WizardSession): WizardSession
submitActivity(session: WizardSession): Promise<ActivityRecord>