fix: context-aware back button for cross-module admin navigation
All checks were successful
All checks were successful
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:
@@ -41,12 +41,10 @@
|
||||
{{ _('loyalty.admin.merchant_detail.admin_policy') }}
|
||||
</a>
|
||||
<a
|
||||
:href="`/admin/merchants/${merchant?.id}`"
|
||||
target="_blank"
|
||||
:href="`/admin/merchants/${merchant?.id}?back=/admin/loyalty/merchants/${merchantId}`"
|
||||
class="flex items-center px-4 py-2 text-sm font-medium leading-5 text-gray-700 transition-colors duration-150 bg-gray-100 border border-gray-300 rounded-lg hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-600">
|
||||
<span x-html="$icon('building-office', 'w-4 h-4 mr-2')"></span>
|
||||
{{ _('loyalty.admin.merchant_detail.view_merchant') }}
|
||||
<span x-html="$icon('arrow-top-right-on-square', 'w-3 h-3 ml-1 opacity-50')"></span>
|
||||
</a>
|
||||
<a x-show="program"
|
||||
:href="`/admin/loyalty/merchants/${merchantId}/cards`"
|
||||
|
||||
Reference in New Issue
Block a user