{% extends "base.html" %} {% block title %}py-phone-caller {{ _('Managed Calls') }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{{ _('Incident Audit Report') }}
{% if search_query %} {% endif %}
{% for element in paginated_data %} {% set call = table_data[element] %} {% endfor %} {% if paginated_data|length == 0 %} {% endif %}
{{ _('Element') }} {% if sort_by == 'element' %} {% endif %} {{ _('Id') }} {{ _('Callee') }} {{ _('Flags') }} {{ _('Message') }} {{ _('Channel') }} {{ _('To Dial') }} {% if sort_by == 'times_to_dial' %} {% endif %} {{ _('Dialed') }} {% if sort_by == 'dialed_times' %} {% endif %} {{ _('First Dial') }} {% if sort_by == 'first_dial_time' %} {% endif %} {{ _('Last Dial') }} {% if sort_by == 'last_dial_time' %} {% endif %} {{ _('Acknowledgement') }} {% if sort_by == 'acknowledge_at' %} {% endif %} {{ _('Status') }}
{{ element }} {{ call.get("id") }} {{ call.get("phone") }} {% if call.get("oncall") %} {{ _('On Call') }} {% endif %} {% if call.get("backup_callee") %} {{ _('Backup') }} {% endif %}
{{ call.get("message") }} {% if call.get("msg_chk_sum") %} {% set audio_file = (call.get("msg_chk_sum") ~ "_" ~ call.get("lang") ~ ".wav") if call.get("lang") else (call.get("msg_chk_sum") ~ ".wav") %} {% endif %}
{{ call.get("asterisk_chan") }} {{ call.get("times_to_dial") }} {{ call.get("dialed_times") }} {{ call.get("first_dial").strftime("%d/%m/%Y %H:%M:%S") if call.get("first_dial") else "-" }} {{ call.get("last_dial").strftime("%d/%m/%Y %H:%M:%S") if call.get("last_dial") else "-" }} {{ call.get("acknowledge_at").strftime("%d/%m/%Y %H:%M:%S") if call.get("acknowledge_at") else "-" }} {% if call.get("cycle_done") == True %} {{ _('Completed') }} {% else %} {% set first_dial = call.get("first_dial") %} {% set seconds_to_forget = call.get("seconds_to_forget") %} {% set current_time = now %} {% if first_dial and seconds_to_forget %} {% set firing_end_time = first_dial + timedelta(seconds=seconds_to_forget) %} {% if current_time <= firing_end_time %} {% else %} {{ _('Expired') }} {% endif %} {% else %} {{ _('Pending') }} {% endif %} {% endif %}
{{ _('No managed calls found') }}{% if search_query %} {{ _('for') }} "{{ search_query }}"{% endif %}
{% if search_query %}{% endif %}
{% if total_pages > 1 %} {% endif %}
{% endblock %} {% block extra_js %} {% endblock %}