feat: add OMS platform admin and align "Store panel" naming
Some checks failed
Some checks failed
Add create_oms_admin (admin@omsflow.lu) alongside existing loyalty admin, both using a shared create_platform_admin helper. Rename "Dashboard" and "Staff login" labels to "Store panel" and "Store login" across seed output. Add customer login URLs to production-style access section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1369,6 +1369,9 @@ def print_summary(db: Session):
|
||||
role_name = su.role.name if su.role else "owner"
|
||||
print(f" Team: {user.email} ({role_name})")
|
||||
|
||||
port = settings.api_port
|
||||
base = f"http://localhost:{port}"
|
||||
|
||||
print("\n🔐 Demo Merchant Owner Credentials:")
|
||||
print("─" * 70)
|
||||
for i, merchant_data in enumerate(DEMO_COMPANIES[:merchant_count], 1):
|
||||
@@ -1379,10 +1382,10 @@ def print_summary(db: Session):
|
||||
if merchant and merchant.stores:
|
||||
for store in merchant.stores:
|
||||
print(
|
||||
f" Store: http://localhost:8000/store/{store.store_code}/login"
|
||||
f" Store panel: {base}/store/{store.store_code}/login"
|
||||
)
|
||||
print(
|
||||
f" or http://{store.subdomain}.localhost:8000/store/login" # noqa: SEC034
|
||||
f" or http://{store.subdomain}.localhost:{port}/store/login" # noqa: SEC034
|
||||
)
|
||||
print()
|
||||
|
||||
@@ -1419,9 +1422,6 @@ def print_summary(db: Session):
|
||||
for store_id, platform_code in store_platform_rows:
|
||||
store_platform_map.setdefault(store_id, []).append(platform_code)
|
||||
|
||||
port = settings.api_port
|
||||
base = f"http://localhost:{port}"
|
||||
|
||||
# Build store→platform details (including custom subdomains) for production URLs
|
||||
from app.modules.tenancy.models import Platform
|
||||
|
||||
@@ -1450,8 +1450,8 @@ def print_summary(db: Session):
|
||||
for pc in platform_codes:
|
||||
print(f" [{pc}] Storefront: {base}/platforms/{pc}/storefront/{store.store_code}/")
|
||||
print(f" [{pc}] Customer login: {base}/platforms/{pc}/storefront/{store.store_code}/account/login")
|
||||
print(f" [{pc}] Store dashboard: {base}/platforms/{pc}/store/{store.store_code}/")
|
||||
print(f" [{pc}] Staff login: {base}/platforms/{pc}/store/{store.store_code}/login")
|
||||
print(f" [{pc}] Store panel: {base}/platforms/{pc}/store/{store.store_code}/")
|
||||
print(f" [{pc}] Store login: {base}/platforms/{pc}/store/{store.store_code}/login")
|
||||
else:
|
||||
print(" (!) No platform assigned")
|
||||
|
||||
@@ -1464,8 +1464,9 @@ def print_summary(db: Session):
|
||||
subdomain = d["custom_subdomain"] or store.subdomain
|
||||
pdomain = d["domain"] or f"{d['code']}.example.com"
|
||||
suffix = " (custom subdomain)" if d["custom_subdomain"] else ""
|
||||
print(f" [{d['code']}] Storefront: https://{subdomain}.{pdomain}/{suffix}")
|
||||
print(f" [{d['code']}] Dashboard: https://{subdomain}.{pdomain}/store/dashboard")
|
||||
print(f" [{d['code']}] Storefront: https://{subdomain}.{pdomain}/{suffix}")
|
||||
print(f" [{d['code']}] Customer login: https://{subdomain}.{pdomain}/account/login")
|
||||
print(f" [{d['code']}] Store panel: https://{subdomain}.{pdomain}/store/")
|
||||
# Show custom domain if any
|
||||
custom_domain = (
|
||||
db.query(StoreDomain)
|
||||
|
||||
Reference in New Issue
Block a user