feat(loyalty): add paginated transaction history to card detail
Some checks failed
CI / ruff (push) Successful in 15s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled

The store card detail page now shows paginated transaction history
instead of a flat list of 50. Uses PlatformSettings.getRowsPerPage()
for the page size (default 20), with Previous/Next navigation and
"Page X of Y" indicator using server-rendered i18n.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 22:13:00 +02:00
parent 64fe58c171
commit 914967edcc
3 changed files with 44 additions and 4 deletions

View File

@@ -151,6 +151,23 @@
</template>
</tbody>
{% endcall %}
<!-- Pagination -->
<div x-show="txPagination.pages > 1" class="px-4 py-3 border-t border-gray-200 dark:border-gray-700 flex items-center justify-between">
<button @click="txPreviousPage()" :disabled="txPagination.page <= 1"
type="button"
class="px-3 py-1 text-sm border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50">
{{ _('loyalty.common.previous') }}
</button>
<span class="text-sm text-gray-500 dark:text-gray-400"
x-text="'{{ _('loyalty.store.card_detail.page_x_of_y') }}'.replace('{page}', txPagination.page).replace('{pages}', txPagination.pages)">
</span>
<button @click="txNextPage()" :disabled="txPagination.page >= txPagination.pages"
type="button"
class="px-3 py-1 text-sm border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50">
{{ _('loyalty.common.next') }}
</button>
</div>
</div>
</div>
{% endblock %}