{% extends 'base.html' %} {% load static i18n %} {% block title %}{% trans "Interview Management" %} - ATS{% endblock %} {% block customCSS %} {% endblock %} {% block content %}

{% trans "Interview Management" %}

{% trans "Total Interviews:" %} {{ interviews|length }}

{% comment %} {% endcomment %}
{% trans "Clear" %}
{# Using 'meetings' based on the context_object_name provided #} {% if interviews %}
{# View Switcher (kept the name for simplicity) #} {% include "includes/_list_view_switcher.html" with list_id="meetings-list" %} {# Card View #}
{% for interview in meetings %}
{{ interview.candidate.name }}
{{ interview.status|title }}

{% trans "Job" %}: {{ interview.job.title }}
{# --- Remote/Onsite Logic - Handles both cases safely --- #} {% trans "Type" %}: {{ interview.schedule.get_interview_type_display }} {% if interview.schedule.interview_type == 'Remote' %}
{# CRITICAL FIX: Safe access to zoom_meeting details #} {% trans "Zoom ID" %}: {{ interview.zoom_meeting.meeting_id|default:"N/A" }} {% else %}
{% trans "Location" %}: {{ interview.schedule.location }} {% endif %}
{% trans "Date" %}: {{ interview.interview_date|date:"M d, Y" }}
{% trans "Time" %}: {{ interview.interview_time|time:"H:i" }}
{% trans "Duration" %}: {{ interview.schedule.interview_duration }} minutes

{% trans "View" %} {# CRITICAL FIX: Safe access to join URL #} {% if interview.schedule.interview_type == 'Remote' and interview.zoom_meeting and interview.zoom_meeting.join_url %} {% trans "Join" %} {% endif %}
{% endfor %}
{% csrf_token %}
{% comment %} {% endcomment %} {% for interview in interviews %} {% endfor %}
{% trans "Candidate" %} {% trans "Job" %} {% trans "Date & Time" %} {% trans "Type" %} {% trans "Status" %} {% trans "Participants" %} {% trans "Actions" %}
{{ interview.application.name }}
{{ interview.application.email }}
{{ interview.application.phone }}
{{ interview.job.title }}
{{ interview.job.department }}
{{ interview.interview_date|date:"d-m-Y" }}
{{ interview.interview_time|date:"h:i A" }}
{% if interview.interview.location_type == 'Remote' %} {% trans "Remote" %} {% else %} {% trans "Onsite" %} {% endif %} {{ interview.status|upper }}
{% comment %} {% if interview.status != 'CANCELLED' and interview.status != 'COMPLETED' %} {% endif %} {% endcomment %}
{% if is_paginated %} {% endif %} {% else %} {% endif %}
{% endblock %} {% block customJS %} {% endblock %}