fix: use PlatformSettings for pagination in Letzshop page
- Load rows per page from PlatformSettings in init() - Apply setting to ordersLimit, exceptionsLimit, productsLimit, jobsPagination - Replace alert() with Utils.showToast() for error display - Improve viewJobErrors to show errors in modal instead of alert - Update architecture validator to catch non-standard pagination patterns (jobsPagination, ordersLimit, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2718,8 +2718,18 @@ class ArchitectureValidator:
|
||||
if file_path.name in excluded_files:
|
||||
return
|
||||
|
||||
# Check if this file has pagination (look for pagination object)
|
||||
has_pagination = re.search(r"pagination:\s*\{", content)
|
||||
# Check for various pagination patterns:
|
||||
# - Standard: pagination: { ... }
|
||||
# - Named: jobsPagination: { ... }, ordersPagination: { ... }
|
||||
# - Separate vars: ordersLimit, productsLimit, etc.
|
||||
pagination_patterns = [
|
||||
r"pagination:\s*\{",
|
||||
r"\w+Pagination:\s*\{",
|
||||
r"(orders|products|exceptions|jobs|items)Limit\s*:",
|
||||
r"per_page\s*:\s*\d+",
|
||||
]
|
||||
|
||||
has_pagination = any(re.search(p, content) for p in pagination_patterns)
|
||||
if not has_pagination:
|
||||
return
|
||||
|
||||
@@ -2729,7 +2739,7 @@ class ArchitectureValidator:
|
||||
if not uses_platform_settings:
|
||||
# Find the line where pagination is defined
|
||||
for i, line in enumerate(lines, 1):
|
||||
if "pagination:" in line and "{" in line:
|
||||
if re.search(r"(pagination|Pagination|Limit|per_page)\s*[:{]", line):
|
||||
self._add_violation(
|
||||
rule_id="JS-010",
|
||||
rule_name="Use PlatformSettings for pagination",
|
||||
|
||||
Reference in New Issue
Block a user