{% load i18n %}
{% trans "Cancelled" %} {% trans "Requested" %} {% trans "Approved" %}
{% if user_leaves %}
{% for user_leave in user_leaves %}
{% if user_leave.leave_type_id.icon %} Leave Icon {% else %} Leave Icon {% endif %}
{{user_leave.leave_type_id}} {% trans "Available Leave Days" %} : {{user_leave.available_days}}
{% trans "Carryforward Leave Days" %} : {{user_leave.carryforward_days}}
{% trans "Total Leave Days" %} : {{user_leave.total_leave_days}}
{% endfor %}
{% elif employee_leaves %}
{% for employee_leave in employee_leaves %}
{% if employee_leave.leave_type_id.icon %} Leave Icon {% else %} Leave Icon {% endif %}
{{employee_leave.leave_type_id}} {% trans "Available Leave Days" %} : {{employee_leave.available_days}}
{% trans "Carryforward Leave Days" %} : {{employee_leave.carryforward_days}}
{% trans "Total Leave Days" %} : {{employee_leave.total_leave_days}}
{% endfor %}
{% else %} {% endif %}
{% trans "Leave Type" %}
{% trans "Start Date" %}
{% trans "End Date" %}
{% trans "Requested days" %}
{% trans "Status" %}
{% if perms.leave.change_leaverequest %}
{% endif %}
{% for leave_request in employee.leaverequest_set.all %}
{% if leave_request.leave_type_id.icon %} Leave Type Icon {% else%} Leave type icon {% endif %}
{{leave_request.leave_type_id}}
{{leave_request.start_date}}
{{leave_request.end_date}}
{{leave_request.requested_days}}
{{leave_request.get_status_display}}
{% if perms.leave.change_leaverequest %}
{% if leave_request.status != 'approved' %} {% else %} {% endif %} {% if leave_request.status != 'cancelled' %} {% else %} {% endif %}
{% endif %}
{% endfor %}