{% if logs %}
{% if request.endpoint == 'access_logs' %} {% endif %} {% for log in logs %} {% if request.endpoint == 'access_logs' %} {% endif %} {% endfor %}
{{ _('device_id') }} {{ _('user_name') }} {{ _('device_name') }} UUID {{ _('access_type') }} {{ _('status') }} {{ _('description') }} {{ _('date_time') }}{{ _('actions') }}
{{ log.device_id }} {% if log.user_name %} {% else %} {{ _('unknown_user') }} {% endif %} {% if log.device_name %} {{ log.device_name }} {% else %} {{ log.device_id }} {% endif %} {{ log.card_uuid or 'N/A' }} {% set access_types = {1: ('NFC','access-nfc'), 2: ('BUTTON','access-button'), 3: ('TCP SERVER','access-tcpserver'), 4: ('TCP CLIENT','access-tcpclient'), 5: ('BLE','access-ble'), 6: ('RS485','access-rs485')} %} {% if log.access_type %} {% set type_info = access_types.get(log.access_type|int, ('UNKNOWN','access-unknown')) %}
{% if log.access_type == 1 or log.access_type == '1' %} {% elif log.access_type == 2 or log.access_type == '2' %} {% elif log.access_type == 3 or log.access_type == '3' %} {% elif log.access_type == 4 or log.access_type == '4' %} {% elif log.access_type == 5 or log.access_type == '5' %} {% elif log.access_type == 6 or log.access_type == '6' %} {% else %} {% endif %} {% if (log.access_type == 3 or log.access_type == '3') and (log.notes == 'Admin Panel') %} {{ _('web_page_label') }} {% elif (log.access_type == 3 or log.access_type == '3') and (log.is_terminal == 2 or log.is_terminal == '2') %} {{ _('mobile_page_label') }} {% else %} {{ type_info[0] }} {% endif %}
{% else %}
{{ log.access_type or _('unknown') }}
{% endif %}
{% if log.is_granted %} {{ _('IZIN_VERILDI') }} {% else %} {{ _('IZIN_VERILMEDI') }} {% endif %} {% if log.notes == 'Admin Panel' %} {{ _('admin_panel') }} {% elif (log.notes or '') == 'Cihaz Verisi' %} {{ _('device_data') }} {% elif (log.notes or '').lower() in ['mobil uygulama giriş','mobil uygulama giris','mobile app entry'] %} {{ _('mobile_app_entry') }} {% elif (log.notes or '').lower() in ['mesai giriş','mesai giris','shift in'] %} {{ _('shift_in_label') }} {% elif (log.notes or '').lower() in ['mesai çıkış','mesai cikis','shift out'] %} {{ _('shift_out_label') }} {% elif (log.notes or '').lower() in ['mola giriş','mola giris','break in'] %} {{ _('break_in_label') }} {% elif (log.notes or '').lower() in ['mola çıkış','mola cikis','break out'] %} {{ _('break_out_label') }} {% elif (log.notes or '').lower() in ['misafir giriş','misafir giris','guest in'] %} {{ _('guest_in_label') }} {% elif (log.notes or '').lower() in ['misafir çıkış','misafir cikis','guest out'] %} {{ _('guest_out_label') }} {% else %} {{ log.notes or '' }} {% endif %} {% if log.source == 'new' %} {{ log.timestamp|datetime }} {% else %} {{ log.timestamp }} {% endif %}
{% if total_pages and total_pages > 1 %}
{{ _('pagination_showing') }} {{ (page - 1) * per_page + 1 }} {{ _('pagination_to') }} {{ page * per_page if page * per_page < total_logs else total_logs }} {{ _('pagination_of_total') }} {{ total_logs }} {{ _('pagination_entries') }}
{% endif %} {% else %}

{{ _('no_access_logs') }}

{{ _('no_access_logs_description') }}

{% endif %}