{% load i18n %}
<html>
<head>
    <title>{{ head_title }}</title>
<style>
th{
  text-align: left;
}
</style>
</head>
<body>
<h1>{% trans 'Easy TimePro Approval Remind' %}</h1>
<div>
    <form>
        <div><h1>Dear {{ approval.first_name }}: </h1></div>
        <div style="border-bottom: 1px solid #d5d8d2">
            <h2>{{ title }}</h2>
        </div>
        <div>
            <table>
                <tbody>
                <tr>
                    <th colspan="2" style="text-align:center; background-color: #a4a9aa; height:50px;">{{ object_name }}</th>
                </tr>
                <tr>
                    <th>{% trans 'emp_field_employeeCode' %}</th>
                    <td>{{ applicant.emp_code }}</td>
                </tr>
                <tr>
                    <th>{% trans 'emp_field_firstName' %}</th>
                    <td>{{ applicant.get_name }}</td>
                </tr>
                <tr>
                    <th>{% trans 'department_filed_name' %}</th>
                    <td>{{ applicant.department.dept_name }}</td>
                </tr>
                <tr>
                    <th>{% trans 'position_field_name' %}</th>
                    <td>{{ applicant.position.position_name }}</td>
                </tr>
                {% if exception.manuallog %}
                    <tr>
                        <th>{% trans 'transaction_punch_time' %}</th>
                        <td>{{ exception.punch_time }}</td>
                    </tr>
                {% else %}
                    {% if is_payroll %}
                        <tr>
                            <th>{% trans 'report_column_type' %}</th>
                            <td>{{ payroll_type }}</td>
                        </tr>
                        <tr>
                            <th>{% trans 'start_time' %}</th>
                            <td>{{ exception.rmb_start_date }}</td>
                        </tr>
                        <tr>
                            <th>{% trans 'end_time' %}</th>
                            <td>{{ exception.rmb_end_date }}</td>
                        </tr>
                    {% else %}
                        <tr>
                            <th>{% trans 'report_column_type' %}</th>
                            <td>{{ exception.get_sub_category }}</td>
                        </tr>
                        <tr>
                            <th>{% trans 'start_time' %}</th>
                            <td>{{ exception.start_time }}</td>
                        </tr>
                        <tr>
                            <th>{% trans 'end_time' %}</th>
                            <td>{{ exception.end_time }}</td>
                        </tr>
                    {% endif %}
                {% endif %}
{#                {% if exception.last_approver %}#}
{#                    <tr>#}
{#                        <th>{% trans 'last_approver' %}</th>#}
{#                        <td>{{ exception.last_approver }}</td>#}
{#                    </tr>#}
{#                {% endif %}>#}
                {% if exception.audit_reason %}
                    <tr>
                        <th>{% trans 'audit_reason' %}</th>
                        <td>{{ exception.audit_reason }}</td>
                    </tr>
                {% endif %}
                {% if approval_list %}
                    {% for approval in approval_list %}
                        {% if is_rejected %}
                            <tr>
                                <th>{{ approval.name }}</th>
                                {% if approval.status == 'Pending' %}
                                    <td>{{ "Rejected By " }}{{ is_rejected}}</td>
                                {% else %}
                                    <td>{{ approval.status }}</td>
                                {% endif %}
                            </tr>
                        {% else %}
                            <tr>
                                <th>{{ approval.name }}</th>
                                <td>{{ approval.status }}</td>
                            </tr>
                        {% endif %}
                    {% endfor %}
                {% endif %}
                <tr>
                    <th>{% trans 'Status' %}</th>
                    <td>{{ exception.workflow_current_state_name }}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>
</body>
</html>