fix: add TPL-011 rule for deprecated macros, fix billing-history pagination

- Add TPL-011 architecture rule to detect deprecated macros
- Add pagination_full to deprecated macros list (expects flat vars)
- Fix billing-history.html to use standard pagination macro
- Add deprecation notice to pagination_full macro in pagination.html

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-31 22:57:07 +01:00
parent ace931aaf8
commit 6e6971fd32
3 changed files with 46 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
{% from 'shared/macros/alerts.html' import alert_dynamic, error_state %}
{% from 'shared/macros/headers.html' import page_header_refresh %}
{% from 'shared/macros/tables.html' import table_wrapper, table_header_custom, th_sortable %}
{% from 'shared/macros/pagination.html' import pagination_full %}
{% from 'shared/macros/pagination.html' import pagination %}
{% block title %}Billing History{% endblock %}
@@ -198,7 +198,7 @@
{% endcall %}
<!-- Pagination -->
{{ pagination_full() }}
{{ pagination(show_condition="!loading && pagination.total > 0") }}
{% endblock %}

View File

@@ -96,11 +96,17 @@
{#
Pagination Full Macro (First/Prev/Numbers/Next/Last)
=====================================================
A full pagination component with first, previous, page numbers, next, and last buttons.
⚠️ DEPRECATED: Use the standard 'pagination' macro instead.
Usage:
{% from 'shared/macros/pagination.html' import pagination_full %}
{{ pagination_full() }}
This macro expects flat variables (total, skip, page, limit) but our Alpine.js
components use nested pagination objects (pagination.total, pagination.page, etc.).
Use:
{% from 'shared/macros/pagination.html' import pagination %}
{{ pagination(show_condition="!loading && pagination.total > 0") }}
---
Legacy documentation (for reference only):
Required Alpine.js data properties:
- page: Current page number