Claude
4c647f4182
Fix onboarding API dependencies after removing manual path
**Root Cause:**
Frontend removed data-source-choice step and manual path, but backend
still required data-source-choice as dependency for smart-inventory-setup.
This caused: "Cannot complete step smart-inventory-setup: dependencies not met"
**Changes:**
1. **Removed data-source-choice step** (line 48)
- No longer in ONBOARDING_STEPS list
- AI-assisted is now the only path
2. **Updated setup dependencies** (line 79)
- Before: "setup": ["user_registered", "data-source-choice"]
- After: "setup": ["user_registered", "bakery-type-selection"]
- Removed dependency on non-existent step
3. **Removed manual path steps**
- Removed "inventory-setup" from ONBOARDING_STEPS
- Kept only AI-assisted path steps
4. **Updated suppliers dependencies** (line 87)
- Now requires "smart-inventory-setup" completion
- Makes logical sense: need inventory before suppliers
5. **Simplified ML training validation** (lines 278-299)
- Removed manual path check (inventory-setup)
- Only validates AI path (smart-inventory-setup)
- Cleaner logic without dual-path complexity
**Step Order (Updated):**
```
1. user_registered
2. bakery-type-selection
3. setup (tenant creation)
4. smart-inventory-setup (AI inventory)
5. product-categorization
6. initial-stock-entry
7. suppliers-setup
8. recipes-setup (optional)
9. production-processes (optional)
10. quality-setup (optional)
11. team-setup (optional)
12. ml-training
13. setup-review
14. completion
```
**Dependency Chain (Fixed):**
```
smart-inventory-setup → setup → bakery-type-selection → user_registered
(was broken: smart-inventory-setup → setup → data-source-choice [MISSING!])
```
**Files Modified:**
- services/auth/app/api/onboarding_progress.py:42-101,278-299
**Impact:**
✅ Onboarding steps now work correctly from initial bakery registration
✅ No more "dependencies not met" errors
✅ Backend matches frontend architecture
2025-11-07 08:18:39 +00:00
..
2025-11-07 08:18:39 +00:00
2025-10-15 16:12:49 +02:00
2025-10-16 07:28:04 +02:00
2025-10-07 07:15:07 +02:00
2025-10-24 13:05:04 +02:00
2025-10-31 11:54:19 +01:00
2025-07-17 13:09:24 +02:00
2025-10-16 07:28:04 +02:00