Improve the frontend 2
This commit is contained in:
@@ -170,7 +170,6 @@ async def clone_demo_data(
|
||||
is_demo=True,
|
||||
is_demo_template=False,
|
||||
business_model=demo_account_type,
|
||||
subscription_tier="demo", # Special tier for demo sessions
|
||||
is_active=True,
|
||||
timezone="Europe/Madrid",
|
||||
owner_id=demo_owner_uuid # Required field - matches seed_demo_users.py
|
||||
@@ -179,6 +178,21 @@ async def clone_demo_data(
|
||||
db.add(tenant)
|
||||
await db.flush() # Flush to get the tenant ID
|
||||
|
||||
# Create demo subscription (enterprise tier for full access)
|
||||
from app.models.tenants import Subscription
|
||||
demo_subscription = Subscription(
|
||||
tenant_id=tenant.id,
|
||||
plan="enterprise", # Demo gets full access
|
||||
status="active",
|
||||
monthly_price=0.0, # Free for demo
|
||||
billing_cycle="monthly",
|
||||
max_users=-1, # Unlimited
|
||||
max_locations=-1,
|
||||
max_products=-1,
|
||||
features={}
|
||||
)
|
||||
db.add(demo_subscription)
|
||||
|
||||
# Create tenant member records for demo owner and staff
|
||||
from app.models.tenants import TenantMember
|
||||
import json
|
||||
|
||||
Reference in New Issue
Block a user