{# Unit Search Results Partial Rendered by /api/roster/search/units endpoint for HTMX dropdown. Variables: - units: List of unit dicts with id, device_type, note, deployed, display - query: The search query string - show_empty: Boolean - show "no results" message #} {% set picker_id = request.query_params.get('picker_id', '') %} {% if units %} {% for unit in units %}
{{ unit.id }}
{% if unit.note %}
{{ unit.note }}
{% endif %}
{% if unit.device_type == 'seismograph' %} Seismo {% elif unit.device_type == 'slm' %} SLM {% endif %} {% if not unit.deployed %} Benched {% endif %}
{% endfor %} {% endif %} {% if show_empty %}

No units found matching "{{ query }}"

{% endif %} {% if not units and not show_empty %}

Start typing to search units...

Search by unit ID or note

{% endif %}