{% extends 'base.html' %}
{% load i18n %}

{% block content %}
<div class="container-fluid">
    <h1 class="h3 mb-4 text-gray-800">{{ employee.first_name }} {{ employee.last_name }}</h1>

    <div class="row">
        <div class="col-lg-6">
            <div class="card shadow mb-4">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-primary">{% trans "Personal Information" %}</h6>
                </div>
                <div class="card-body">
                    <p><strong>{% trans "Email" %}:</strong> {{ employee.email }}</p>
                    <p><strong>{% trans "Phone" %}:</strong> {{ employee.phone }}</p>
                    <p><strong>{% trans "Gender" %}:</strong> {{ employee.get_gender_display }}</p>
                    <p><strong>{% trans "Date of Birth" %}:</strong> {{ employee.date_of_birth|default:"-" }}</p>
                    <p><strong>{% trans "Address" %}:</strong> {{ employee.address|default:"-" }}</p>
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="card shadow mb-4">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-primary">{% trans "Job Details" %}</h6>
                </div>
                <div class="card-body">
                    <p><strong>{% trans "Department" %}:</strong> {{ employee.department.name_en }} / {{ employee.department.name_ar }}</p>
                    <p><strong>{% trans "Position" %}:</strong> {{ employee.job_position.title_en }} / {{ employee.job_position.title_ar }}</p>
                    <p><strong>{% trans "Hire Date" %}:</strong> {{ employee.hire_date }}</p>
                    <p><strong>{% trans "Salary" %}:</strong> {{ employee.salary }}</p>
                    <p><strong>{% trans "Status" %}:</strong> {{ employee.get_status_display }}</p>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-12">
             <a href="{% url 'hr:employee_edit' employee.pk %}" class="btn btn-primary">{% trans "Edit Employee" %}</a>
             <a href="{% url 'hr:employee_list' %}" class="btn btn-secondary">{% trans "Back to List" %}</a>
        </div>
    </div>
</div>
{% endblock %}
