feat: add SQL query tool, platform debug, loyalty settings, and multi-module improvements
Some checks failed
CI / ruff (push) Successful in 14s
CI / pytest (push) Failing after 50m12s
CI / validate (push) Successful in 25s
CI / dependency-scanning (push) Successful in 32s
CI / docs (push) Has been skipped
CI / deploy (push) Has been skipped

- Add admin SQL query tool with saved queries, schema explorer presets,
  and collapsible category sections (dev_tools module)
- Add platform debug tool for admin diagnostics
- Add loyalty settings page with owner-only access control
- Fix loyalty settings owner check (use currentUser instead of window.__userData)
- Replace HTTPException with AuthorizationException in loyalty routes
- Expand loyalty module with PIN service, Apple Wallet, program management
- Improve store login with platform detection and multi-platform support
- Update billing feature gates and subscription services
- Add store platform sync improvements and remove is_primary column
- Add unit tests for loyalty (PIN, points, stamps, program services)
- Update i18n translations across dev_tools locales

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 20:08:07 +01:00
parent a77a8a3a98
commit 319900623a
77 changed files with 5341 additions and 401 deletions

View File

@@ -35,6 +35,7 @@ dev_tools_module = ModuleDefinition(
"performance_validation", # Performance validator
"test_runner", # Test execution
"violation_management", # Violation tracking and assignment
"sql_query", # Ad-hoc SQL query tool
],
menu_items={
FrontendType.ADMIN: [
@@ -42,6 +43,7 @@ dev_tools_module = ModuleDefinition(
"icons", # Icon browser page
"code-quality", # Code quality dashboard
"tests", # Test runner dashboard
"sql-query", # SQL query tool
],
FrontendType.STORE: [], # No store menu items - internal module
},
@@ -69,6 +71,20 @@ dev_tools_module = ModuleDefinition(
route="/admin/icons",
order=20,
),
MenuItemDefinition(
id="sql-query",
label_key="dev_tools.menu.sql_query",
icon="database",
route="/admin/sql-query",
order=30,
),
MenuItemDefinition(
id="platform-debug",
label_key="dev_tools.menu.platform_debug",
icon="search",
route="/admin/platform-debug",
order=40,
),
],
),
],
@@ -94,11 +110,8 @@ def get_dev_tools_module_with_routers() -> ModuleDefinition:
"""
Get dev-tools module definition.
Note: API routes have been moved to monitoring module.
This module has no routers to attach.
Note: Admin API routes are auto-discovered from routes/api/admin.py.
"""
# No routers - API routes are now in monitoring module
dev_tools_module.router = None
dev_tools_module.router = None
return dev_tools_module