Commit Graph

7 Commits

Author SHA1 Message Date
2287f4597d feat(hosting,prospecting): add hosting unit tests and fix template bugs
All checks were successful
CI / ruff (push) Successful in 10s
CI / pytest (push) Successful in 48m48s
CI / validate (push) Successful in 24s
CI / dependency-scanning (push) Successful in 29s
CI / docs (push) Successful in 38s
CI / deploy (push) Successful in 51s
- Add 55 unit tests for hosting module (hosted site service, client
  service service, stats service) with full fixture setup
- Fix table_empty_state macro: add x_message param for dynamic Alpine.js
  expressions rendered via x-text instead of server-side Jinja
- Fix hosting templates (sites, clients) using message= with Alpine
  expressions that rendered as literal text
- Fix prospecting templates (leads, scan-jobs, prospects) using
  nonexistent subtitle= param, migrated to x_message=
- Align hosting and prospecting admin templates with shared design system

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 06:18:26 +01:00
dbcbe38217 fix: implement handleSort method for sortable table headers
- Update th_sortable macro to call handleSort(key) instead of inline logic
- Add handleSort method to subscriptions.js, subscription-tiers.js, billing-history.js
- Add sort_by and sort_order params to API calls in all three files
- Reset to page 1 when sort changes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:44:33 +01:00
abfd823ec8 fix: add missing th_sortable macro for sortable table headers
The subscription templates were importing th_sortable but the macro
didn't exist. Added the macro to tables.html with:
- Clickable header with sort indicator arrows
- Alpine.js integration for sorting state
- Visual feedback for current sort column and direction

Also removed unused empty_state import from subscription-tiers.html.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:29:16 +01:00
6bd4b71588 fix: use table_header_custom for custom headers in subscription pages
The table_header() macro doesn't support caller() - it takes a columns list.
Using {% call table_header() %} caused a Jinja2 error:
  "macro 'table_header' was invoked with two values for the special caller argument"

Changes:
- Add table_header_custom() macro that supports caller() for custom headers
- Update subscriptions.html, subscription-tiers.html, billing-history.html
- Add TPL-008 architecture rule to detect this pattern
- Renumber TPL-009 (block names) and TPL-010 (Alpine vars)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:25:33 +01:00
9cf0a568c0 feat: add shared utilities and table macros
- Add shared table macros for consistent table styling
- Add shared JavaScript utilities (date formatting, etc.)
- Add admin settings API enhancements
- Add admin schema updates

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 14:12:43 +01:00
fbd3a45c38 feat: complete TailAdmin parity with remaining macro features
Add missing features identified in TailAdmin gap analysis:

cards.html:
- stat_card_with_trend: Stats card with up/down trend indicator and percentage
- card_with_menu: Card with dropdown menu in header
- card_with_menu_simple: Simplified version with menu_items parameter

tables.html:
- sortable_table_header: Table header with sortable columns, sort indicators,
  and Alpine.js integration for sort state management

forms.html:
- searchable_select: Dropdown with search/filter functionality
- multi_select: Multi-select dropdown with tag display

This completes feature parity with TailAdmin free template.
The tailadmin-free-tailwind-dashboard-template folder can now be deleted.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 19:32:42 +01:00
64ab9031d2 feat: add shared Jinja macros for reusable UI components
Add comprehensive macro library in app/templates/shared/macros/:

- pagination.html: pagination(), pagination_simple()
- alerts.html: loading_state(), error_state(), alert(), toast()
- badges.html: badge(), status_badge(), role_badge(), severity_badge()
- buttons.html: btn(), btn_primary(), btn_danger(), action_button()
- forms.html: form_input(), form_select(), form_textarea(), form_toggle()
- tables.html: table_wrapper(), table_header(), table_empty_state()
- cards.html: stat_card(), card(), info_card(), filter_card()
- headers.html: page_header(), section_header(), breadcrumbs()

These macros standardize TailAdmin styling with Alpine.js integration
and dark mode support, reducing code duplication across templates.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 18:34:59 +01:00