feat: Improve onboarding wizard UI, UX and dark mode support
This commit implements multiple improvements to the onboarding wizard:
**1. Unified UI Components:**
- Created InfoCard component for consistent "why is important" blocks across all steps
- Created TemplateCard component for consistent template displays
- Both components use global CSS variables for proper dark mode support
**2. Initial Stock Entry Step Improvements:**
- Fixed title/subtitle positioning using unified InfoCard component
- Fixed missing count bug in warning message (now uses {{count}} interpolation)
- Fixed dark mode colors using CSS variables (--color-success, --color-info, etc.)
- Changed next button title from "completar configuración" to "Continuar →"
- Implemented stock creation API call using useAddStock hook
- Products with stock now properly save to backend on step completion
**3. Dark Mode Fixes:**
- Fixed QualitySetupStep: Enhanced button selection visibility with rings and shadows
- Fixed TeamSetupStep: Enhanced role selection visibility with rings and shadows
- Fixed AddressAutocomplete: Replaced all hardcoded colors with CSS variables
- All dropdown results, icons, and hover states now properly adapt to dark mode
**4. Streamlined Wizard Flow:**
- Removed POI Detection step from wizard (step previously added complexity)
- POI detection now runs automatically in background after tenant registration
- Non-blocking approach ensures users aren't delayed by POI detection
- Removed Revision step (setup-review) as it adds no user value
- Completion step is now the final step before dashboard
**5. Backend Updates:**
- Updated onboarding_progress.py to remove poi-detection from ONBOARDING_STEPS
- Updated onboarding_progress.py to remove setup-review from ONBOARDING_STEPS
- Updated step dependencies to reflect streamlined flow
- POI detection documented as automatic background process
All changes maintain backward compatibility and use proper TypeScript types.
This commit is contained in:
@@ -48,19 +48,17 @@ ONBOARDING_STEPS = [
|
||||
|
||||
# Phase 2: Core Setup
|
||||
"setup", # Basic bakery setup and tenant creation
|
||||
# NOTE: POI detection now happens automatically in background during tenant registration
|
||||
|
||||
# Phase 2a: POI Detection (Location Context)
|
||||
"poi-detection", # Detect nearby POIs for location-based ML features
|
||||
|
||||
# Phase 2b: AI-Assisted Inventory Setup (REFACTORED - split into 3 focused steps)
|
||||
# Phase 2a: AI-Assisted Inventory Setup (REFACTORED - split into 3 focused steps)
|
||||
"upload-sales-data", # File upload, validation, and AI classification
|
||||
"inventory-review", # Review and confirm AI-detected products with type selection
|
||||
"initial-stock-entry", # Capture initial stock levels
|
||||
|
||||
# Phase 2c: Product Categorization (optional advanced categorization)
|
||||
# Phase 2b: Product Categorization (optional advanced categorization)
|
||||
"product-categorization", # Advanced categorization (may be deprecated)
|
||||
|
||||
# Phase 2d: Suppliers (shared by all paths)
|
||||
# Phase 2c: Suppliers (shared by all paths)
|
||||
"suppliers-setup", # Suppliers configuration
|
||||
|
||||
# Phase 3: Advanced Configuration (all optional)
|
||||
@@ -71,7 +69,7 @@ ONBOARDING_STEPS = [
|
||||
|
||||
# Phase 4: ML & Finalization
|
||||
"ml-training", # AI model training
|
||||
"setup-review", # Review all configuration
|
||||
# "setup-review" removed - not useful for user, completion step is final
|
||||
"completion" # Onboarding completed
|
||||
]
|
||||
|
||||
@@ -83,9 +81,7 @@ STEP_DEPENDENCIES = {
|
||||
|
||||
# Core setup - no longer depends on data-source-choice (removed)
|
||||
"setup": ["user_registered", "bakery-type-selection"],
|
||||
|
||||
# POI Detection - requires tenant creation (setup)
|
||||
"poi-detection": ["user_registered", "setup"],
|
||||
# NOTE: POI detection removed from steps - now happens automatically in background
|
||||
|
||||
# AI-Assisted Inventory Setup - REFACTORED into 3 sequential steps
|
||||
"upload-sales-data": ["user_registered", "setup"],
|
||||
|
||||
Reference in New Issue
Block a user