feat: add mandatory vendor onboarding wizard
Implement 4-step onboarding flow for new vendors after signup: - Step 1: Company profile setup - Step 2: Letzshop API configuration with connection testing - Step 3: Product & order import CSV URL configuration - Step 4: Historical order sync with progress bar Key features: - Blocks dashboard access until completed - Step indicators with visual progress - Resume capability (progress persisted in DB) - Admin skip capability for support cases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ from app.exceptions import (
|
||||
ValidationException,
|
||||
)
|
||||
from app.services.email_service import EmailService
|
||||
from app.services.onboarding_service import OnboardingService
|
||||
from app.services.stripe_service import stripe_service
|
||||
from middleware.auth import AuthManager
|
||||
from models.database.company import Company
|
||||
@@ -372,6 +373,10 @@ class PlatformSignupService:
|
||||
)
|
||||
db.add(vendor_user)
|
||||
|
||||
# Create VendorOnboarding record
|
||||
onboarding_service = OnboardingService(db)
|
||||
onboarding_service.create_onboarding(vendor.id)
|
||||
|
||||
# Create Stripe Customer
|
||||
stripe_customer_id = stripe_service.create_customer(
|
||||
vendor=vendor,
|
||||
@@ -615,11 +620,12 @@ class PlatformSignupService:
|
||||
|
||||
logger.info(f"Completed signup for vendor {vendor_id}")
|
||||
|
||||
# Redirect to onboarding instead of dashboard
|
||||
return SignupCompletionResult(
|
||||
success=True,
|
||||
vendor_code=vendor_code,
|
||||
vendor_id=vendor_id,
|
||||
redirect_url=f"/vendor/{vendor_code}/dashboard",
|
||||
redirect_url=f"/vendor/{vendor_code}/onboarding",
|
||||
trial_ends_at=trial_ends_at.isoformat(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user