feat(hosting,prospecting): add hosting unit tests and fix template bugs
All checks were successful
All checks were successful
- 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>
This commit is contained in:
@@ -222,15 +222,18 @@
|
||||
- message: Empty state message
|
||||
- show_condition: Alpine.js condition (default: 'true')
|
||||
- has_filters: Whether to show filter hint (default: true)
|
||||
- x_message: Alpine.js expression for dynamic message (rendered via x-text)
|
||||
#}
|
||||
{% macro table_empty_state(colspan, icon='inbox', title='No data found', message='', show_condition='true', has_filters=true) %}
|
||||
{% macro table_empty_state(colspan, icon='inbox', title='No data found', message='', show_condition='true', has_filters=true, x_message='') %}
|
||||
<template x-if="{{ show_condition }}">
|
||||
<tr>
|
||||
<td colspan="{{ colspan }}" class="px-4 py-8 text-center text-gray-600 dark:text-gray-400">
|
||||
<div class="flex flex-col items-center">
|
||||
<span x-html="$icon('{{ icon }}', 'w-12 h-12 mb-2 text-gray-300')"></span>
|
||||
<p class="font-medium">{{ title }}</p>
|
||||
{% if message %}
|
||||
{% if x_message %}
|
||||
<p class="text-xs mt-1" x-text="{{ x_message }}"></p>
|
||||
{% elif message %}
|
||||
<p class="text-xs mt-1">{{ message }}</p>
|
||||
{% elif has_filters %}
|
||||
<p class="text-xs mt-1">Try adjusting your search or filters</p>
|
||||
|
||||
Reference in New Issue
Block a user