From 842aa983e16933d40c5e102bf6c67263f1db6940 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Fri, 2 Jan 2026 22:31:00 +0100 Subject: [PATCH] fix: update vendor templates to use simplified pagination macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pagination macro was updated to use a simplified API that only accepts show_condition. Updated 4 vendor templates: - products.html - orders.html - inventory.html - customers.html The macro now relies on standardized Alpine.js component properties (pagination.page, totalPages, pageNumbers, etc.) instead of passing them as macro arguments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/templates/vendor/customers.html | 14 +------------- app/templates/vendor/inventory.html | 14 +------------- app/templates/vendor/orders.html | 14 +------------- app/templates/vendor/products.html | 14 +------------- 4 files changed, 4 insertions(+), 52 deletions(-) diff --git a/app/templates/vendor/customers.html b/app/templates/vendor/customers.html index edd7a3b5..1d2352f3 100644 --- a/app/templates/vendor/customers.html +++ b/app/templates/vendor/customers.html @@ -175,19 +175,7 @@ -
- {{ pagination( - current_page='pagination.page', - total_pages='totalPages', - total_items='pagination.total', - start_index='startIndex', - end_index='endIndex', - page_numbers='pageNumbers', - previous_fn='previousPage()', - next_fn='nextPage()', - goto_fn='goToPage' - ) }} -
+{{ pagination(show_condition="!loading && pagination.total > 0") }}
diff --git a/app/templates/vendor/inventory.html b/app/templates/vendor/inventory.html index 32ca3bd6..f7928862 100644 --- a/app/templates/vendor/inventory.html +++ b/app/templates/vendor/inventory.html @@ -250,19 +250,7 @@
-
- {{ pagination( - current_page='pagination.page', - total_pages='totalPages', - total_items='pagination.total', - start_index='startIndex', - end_index='endIndex', - page_numbers='pageNumbers', - previous_fn='previousPage()', - next_fn='nextPage()', - goto_fn='goToPage' - ) }} -
+{{ pagination(show_condition="!loading && pagination.total > 0") }} {{ modal_simple( diff --git a/app/templates/vendor/orders.html b/app/templates/vendor/orders.html index d53cf1d6..210c7a22 100644 --- a/app/templates/vendor/orders.html +++ b/app/templates/vendor/orders.html @@ -262,19 +262,7 @@ -
- {{ pagination( - current_page='pagination.page', - total_pages='totalPages', - total_items='pagination.total', - start_index='startIndex', - end_index='endIndex', - page_numbers='pageNumbers', - previous_fn='previousPage()', - next_fn='nextPage()', - goto_fn='goToPage' - ) }} -
+{{ pagination(show_condition="!loading && pagination.total > 0") }} {{ modal_simple( diff --git a/app/templates/vendor/products.html b/app/templates/vendor/products.html index 46639fd8..a2e427a0 100644 --- a/app/templates/vendor/products.html +++ b/app/templates/vendor/products.html @@ -316,19 +316,7 @@ -
- {{ pagination( - current_page='pagination.page', - total_pages='totalPages', - total_items='pagination.total', - start_index='startIndex', - end_index='endIndex', - page_numbers='pageNumbers', - previous_fn='previousPage()', - next_fn='nextPage()', - goto_fn='goToPage' - ) }} -
+{{ pagination(show_condition="!loading && pagination.total > 0") }} {{ modal_simple(