feat: add OMS platform admin and align "Store panel" naming
Some checks failed
CI / ruff (push) Successful in 10s
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / validate (push) Has been cancelled
CI / pytest (push) Has been cancelled

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:
2026-02-26 12:12:23 +01:00
parent e7f8e61717
commit ed1cccd2de
2 changed files with 55 additions and 17 deletions

View File

@@ -1379,10 +1379,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()
@@ -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)