Improve the frontend 2

This commit is contained in:
Urtzi Alfaro
2025-10-29 06:58:05 +01:00
parent 858d985c92
commit 36217a2729
98 changed files with 6652 additions and 4230 deletions

View File

@@ -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