{# Tab data fragment — data table for multi-source tab panels, no card wrapper. Contract: ~/.claude/skills/ux-architect/components/tab-data-region.md (UX-057) Used once per source entity inside a multi-source workspace_tabbed_region. Distinct from list.html — no card wrapper (the wrapper lives one level up in workspace-tabbed-region chrome). HTMX target convention: #tab-{region_name}-{source_entity|lower}. Endpoint is /api/workspaces/{ws}/regions/{region}/{source}. v0.62 CSS refactor: inline Tailwind → semantic .dz-tab-data-* classes (components/regions.css). Per-row attention tint via data-dz-attn attribute (critical / warning / notice) instead of a 3-branch ternary emitting different `bg-[...]` Tailwind class strings. #} {% from 'macros/status_badge.html' import render_status_badge %}
{% if filter_columns %}
{% for fc in filter_columns %} {% endfor %}
{% endif %} {% if items %}
{% for col in columns %} {% endfor %} {% for item in items %} {% set attn = item.get("_attention") if item.get is defined else none %} {% for col in columns %} {% endfor %} {% endfor %}
{% if col.sortable %} {{ col.label }} {% if sort_field == col.key %}{{ "▼" if sort_dir == "desc" else "▲" }}{% endif %} {% else %} {{ col.label }} {% endif %}
{% if col.type == "badge" %} {{ render_status_badge(value=item[col.key]) }} {% elif col.type == "bool" %} {{ item[col.key] | bool_icon }} {% elif col.type == "date" %} {{ item[col.key] | timeago }} {% elif col.type == "currency" %} {{ item[col.key] | currency }} {% elif col.type == "ref" %} {% set ref = item[col.key] %} {% set display_name = item.get(col.key ~ "_display", "") %} {% if ref is mapping %} {% set display_name = display_name or (ref | ref_display) %} {% if col.ref_route and ref.get("id") %} {{ display_name }} {% else %}{{ display_name }}{% endif %} {% elif display_name %}{{ display_name }}{% elif ref %}{{ ref }}{% else %}-{% endif %} {% else %} {{ item[col.key] | default("") | truncate_text }} {% endif %}
{% if total > items | length %}

Showing {{ items | length }} of {{ total }}

{% endif %} {% else %}

{{ empty_message | default("No data available.") }}

{% endif %}