fix: context-aware back button for cross-module admin navigation
All checks were successful
CI / ruff (push) Successful in 16s
CI / pytest (push) Successful in 2h40m11s
CI / validate (push) Successful in 32s
CI / dependency-scanning (push) Successful in 37s
CI / docs (push) Successful in 49s
CI / deploy (push) Successful in 1m10s

The tenancy merchant detail page now reads an optional ?back= query
parameter to determine the back button destination. Falls back to
/admin/merchants when no param is present (default behavior preserved).

The loyalty merchant detail "View Merchant" link now passes
?back=/admin/loyalty/merchants/{id} so clicking back from the tenancy
page returns to the loyalty context instead of the merchants list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 16:37:28 +01:00
parent f3344b2859
commit edd55cd2fd
2 changed files with 2 additions and 4 deletions

View File

@@ -11,7 +11,7 @@
{% block alpine_data %}adminMerchantDetail(){% endblock %}
{% block content %}
{% call detail_page_header("merchant?.name || 'Merchant Details'", '/admin/merchants', subtitle_show='merchant') %}
{% call detail_page_header("merchant?.name || 'Merchant Details'", request.query_params.get('back', '/admin/merchants'), subtitle_show='merchant') %}
ID: <span x-text="merchantId"></span>
<span class="text-gray-400 mx-2">|</span>
<span x-text="merchant?.store_count || 0"></span> store(s)