fix(loyalty): pass merchant name server-side to admin on-behalf headers
Load merchant name in page route handlers and pass to template context. Headers now render as "Cards: Fashion Group S.A." using server-side Jinja2 variables instead of relying on JS program.merchant_name which was not in the ProgramResponse schema. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
{% block alpine_data %}adminMerchantCards(){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% call detail_page_header("(program?.merchant_name || '') + ' — " + _('loyalty.admin.merchant_cards.title') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
|
||||
{% call detail_page_header("'" + _('loyalty.admin.merchant_cards.title') + ": " + (merchant_name or '') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
|
||||
{{ _('loyalty.admin.merchant_cards.subtitle') }}
|
||||
{% endcall %}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{% block alpine_data %}adminMerchantPins(){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% call detail_page_header("(program?.merchant_name || '') + ' — " + _('loyalty.admin.merchant_pins.title') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
|
||||
{% call detail_page_header("'" + _('loyalty.admin.merchant_pins.title') + ": " + (merchant_name or '') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
|
||||
{{ _('loyalty.admin.merchant_pins.subtitle') }}
|
||||
{% endcall %}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{% block alpine_data %}adminMerchantTransactions(){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% call detail_page_header("(program?.merchant_name || '') + ' — " + _('loyalty.admin.merchant_transactions.title') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
|
||||
{% call detail_page_header("'" + _('loyalty.admin.merchant_transactions.title') + ": " + (merchant_name or '') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
|
||||
{{ _('loyalty.admin.merchant_transactions.subtitle') }}
|
||||
{% endcall %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user