fix(loyalty): normalize card id field, fix terminal redeem bug
Some checks failed
Some checks failed
The terminal redeem failed with "card not found: unknown" because CardLookupResponse used card_id while CardDetailResponse (from refreshCard) used id. After refresh, selectedCard.card_id was undefined. Fix: standardize on 'id' everywhere (the universal convention): - CardLookupResponse: card_id → id - _build_card_lookup_response: card_id= → id= - loyalty-terminal.js: selectedCard.card_id → selectedCard.id (5 refs) - Removed the card_id/model_validator approach as unnecessary Also fixes Chart.js recursion error on analytics page (inline CDN script instead of optional-libs.html include which caused infinite template recursion in test context). 342 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -155,7 +155,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
{% include 'shared/includes/optional-libs.html' with context %}
|
||||
{{ chartjs_loader() }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
|
||||
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-analytics.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user