fix(telefoni): render initial calls server-side on log page

This commit is contained in:
Christian 2026-05-17 09:36:09 +02:00
parent e0c4e138d6
commit e162ee3fe1

View File

@ -59,7 +59,33 @@
</tr> </tr>
</thead> </thead>
<tbody id="telefoniRows"> <tbody id="telefoniRows">
<tr><td colspan="7" class="text-muted small">Indlæser...</td></tr> {% if initial_calls and initial_calls|length > 0 %}
{% for call in initial_calls %}
<tr>
<td>{{ call.started_at or '-' }}</td>
<td>{{ call.full_name or call.username or '-' }}</td>
<td>{% if call.direction == 'outbound' %}Udgående{% else %}Indgående{% endif %}</td>
<td>{{ call.display_number or '-' }}</td>
<td>
{% if call.kontakt_id %}
<a href="/contacts/{{ call.kontakt_id }}">{{ (call.contact_name or ('Kontakt #' ~ call.kontakt_id))|trim }}</a>
{% else %}
-
{% endif %}
</td>
<td>
{% if call.sag_id %}
<a href="/sag/{{ call.sag_id }}/v3">{{ call.sag_titel or ('Sag #' ~ call.sag_id) }}</a>
{% else %}
-
{% endif %}
</td>
<td class="text-end">{{ call.duration_sec if call.duration_sec is not none else '-' }}</td>
</tr>
{% endfor %}
{% else %}
<tr><td colspan="7" class="text-muted small">Indlæser...</td></tr>
{% endif %}
</tbody> </tbody>
</table> </table>
</div> </div>