feat: multi-module improvements across merchant, store, i18n, and customer systems
All checks were successful
CI / ruff (push) Successful in 12s
CI / pytest (push) Successful in 50m57s
CI / validate (push) Successful in 24s
CI / dependency-scanning (push) Successful in 29s
CI / docs (push) Successful in 40s
CI / deploy (push) Successful in 51s

- Fix platform-grouped merchant sidebar menu with core items at root level
- Add merchant store management (detail page, create store, team page)
- Fix store settings 500 error by removing dead stripe/API tab
- Move onboarding translations to module-owned locale files
- Fix onboarding banner i18n with server-side rendering + context inheritance
- Refactor login language selectors to use languageSelector() function (LANG-002)
- Move HTTPException handling to global exception handler in merchant routes (API-003)
- Add language selector to all login pages and portal headers
- Fix customer module: drop order stats from customer model, add to orders module
- Fix admin menu config visibility for super admin platform context
- Fix storefront auth and layout issues
- Add missing i18n translations for onboarding steps (en/fr/de/lb)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 23:48:25 +01:00
parent f141cc4e6a
commit a77a8a3a98
113 changed files with 3741 additions and 2923 deletions

View File

@@ -0,0 +1,35 @@
"""orders 002 - customer order stats table
Revision ID: orders_002
Revises: orders_001
Create Date: 2026-03-07
"""
import sqlalchemy as sa
from alembic import op
revision = "orders_002"
down_revision = "orders_001"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.create_table(
"customer_order_stats",
sa.Column("id", sa.Integer(), primary_key=True, index=True),
sa.Column("store_id", sa.Integer(), sa.ForeignKey("stores.id"), nullable=False, index=True),
sa.Column("customer_id", sa.Integer(), sa.ForeignKey("customers.id"), nullable=False, index=True),
sa.Column("total_orders", sa.Integer(), nullable=False, server_default="0"),
sa.Column("total_spent_cents", sa.Integer(), nullable=False, server_default="0"),
sa.Column("last_order_date", sa.DateTime(timezone=True), nullable=True),
sa.Column("first_order_date", sa.DateTime(timezone=True), nullable=True),
sa.Column("created_at", sa.DateTime(), server_default=sa.func.now(), nullable=False),
sa.Column("updated_at", sa.DateTime(), server_default=sa.func.now(), nullable=False),
sa.UniqueConstraint("store_id", "customer_id", name="uq_customer_order_stats_store_customer"),
)
op.create_index("idx_customer_order_stats_customer", "customer_order_stats", ["customer_id"])
def downgrade() -> None:
op.drop_table("customer_order_stats")