Align loyalty pages across admin, merchant, and store personas so each sees the same page set scoped to their access level. Admin acts as a superset of merchant with "on behalf" capabilities. New pages: - Store: Staff PINs management (CRUD) - Merchant: Cards, Card Detail, Transactions, Staff PINs (CRUD), Settings (read-only) - Admin: Merchant Cards, Card Detail, Transactions, PINs (read-only) Architecture: - 4 shared Jinja2 partials (cards-list, card-detail, transactions, pins) - 4 shared JS factory modules parameterized by apiPrefix/scope - Persona templates are thin wrappers including shared partials - PinDetailResponse schema for cross-store PIN listings API: 17 new endpoints (11 merchant, 6 admin on-behalf) Tests: 38 new integration tests, arch-check green i18n: ~130 new keys across en/fr/de/lb Docs: pages-and-navigation.md with full page matrix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
1.3 KiB
HTML
35 lines
1.3 KiB
HTML
{# app/modules/loyalty/templates/loyalty/merchant/cards.html #}
|
|
{% extends "merchant/base.html" %}
|
|
{% from 'shared/macros/headers.html' import page_header_flex, refresh_button %}
|
|
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
|
|
|
|
{% block title %}{{ _('loyalty.merchant.cards.title') }}{% endblock %}
|
|
|
|
{% block i18n_modules %}['loyalty']{% endblock %}
|
|
|
|
{% block alpine_data %}merchantLoyaltyCards(){% endblock %}
|
|
|
|
{% block content %}
|
|
{% call page_header_flex(title=_('loyalty.merchant.cards.title'), subtitle=_('loyalty.merchant.cards.subtitle')) %}
|
|
<div class="flex items-center gap-3">
|
|
{{ refresh_button(loading_var='loading', onclick='loadCards()', variant='secondary') }}
|
|
</div>
|
|
{% endcall %}
|
|
|
|
{{ loading_state(_('loyalty.merchant.cards.loading')) }}
|
|
|
|
{{ error_state(_('loyalty.merchant.cards.error_loading')) }}
|
|
|
|
{% set cards_api_prefix = '/merchants/loyalty' %}
|
|
{% set cards_base_url = '/merchants/loyalty/cards' %}
|
|
{% set show_store_filter = true %}
|
|
{% set show_enroll_button = false %}
|
|
{% include 'loyalty/shared/cards-list.html' %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block extra_scripts %}
|
|
<script defer src="{{ url_for('loyalty_static', path='shared/js/loyalty-cards-list.js') }}"></script>
|
|
<script defer src="{{ url_for('loyalty_static', path='merchant/js/loyalty-cards.js') }}"></script>
|
|
{% endblock %}
|