Wizard State Manager
Component Detail
Service Layer
high complexity
mobile
1
Dependencies
1
Dependents
2
Entities
0
Integrations
Description
BLoC-based state manager that holds the complete form state across all wizard steps and orchestrates navigation, validation, and submission. Preserves user input when navigating back and forward between steps, and handles the final API call to POST /api/v1/activities with the assembled payload.
wizard-state-manager
Responsibilities
- Maintain form state across all wizard steps without data loss on back-navigation
- Perform per-step validation on Next tap with error feedback
- Assemble complete activity payload from all step data for submission
- Submit activity to REST API and handle success/error responses
- Support configurable step order per organization via labels/settings system
Interfaces
initializeWizard(featureConfig)
updateStepData(stepIndex, data)
validateStep(stepIndex)
getStepData(stepIndex)
getFullWizardState()
getCurrentStep()
goToNextStep()
goToPreviousStep()
submitActivity()
resetWizard()
isStepValid(stepIndex)
getValidationErrors(stepIndex)
getStepOrder(organizationConfig)
Relationships
Related Data Entities (2)
Data entities managed by this component