{# Summary cards #}
{% include "opportunities/_summary_cards.html" %}
{# Background jobs banner #}
{% if background_jobs_running %}
Background work:
{% set parts = [] %}
{% if running_syncs %}{% set _ = parts.append(running_syncs ~ ' sync' ~ ('s' if running_syncs != 1 else '')) %}{% endif %}
{% if running_detections %}{% set _ = parts.append(running_detections ~ ' detection' ~ ('s' if running_detections != 1 else '')) %}{% endif %}
{% if running_solutions %}{% set _ = parts.append(running_solutions ~ ' solution' ~ ('s' if running_solutions != 1 else '')) %}{% endif %}
{{ parts | join(', ') }}
· auto-refresh on
{% endif %}
{# Hidden trigger for SSE-based auto-refresh (preserves sort order).
Use absolute + invisible (not display:none) so programmatic .click()
still fires datastar event handlers and sends signals correctly. #}
{# Filter controls #}
{% include "opportunities/_filter_controls.html" %}
{# Loading indicator #}
Loading...
{# Content area (table or grouped view) #}
{% if signals.group in ('project', 'type') %}
{% include "opportunities/_grouped.html" %}
{% elif local_runtime_mode and model_groups is defined and model_groups is not none %}
{% include "opportunities/_grouped_by_model.html" %}
{% else %}
{% include "opportunities/_table.html" %}
{% endif %}