- {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %}
-
{% trans "Confirmation" %}
- {% endif %}
-
-
-
- {% for shift_request in data %}
-
-
-
-
-
-
-
-
-
-
+
+
+ {% if data %}
+
+
+
+
+
+
+
- {{shift_request.employee_id}}
-
-
{{shift_request.shift_id}}
-
{{shift_request.previous_shift_id}}
-
{{shift_request.requested_date}}
-
{{shift_request.requested_till}}
-
{% if shift_request.approved %}{% trans "Approved" %}{% elif shift_request.canceled %}{% trans "Rejected" %}{% else %}{% trans "Requested" %}{% endif %}
-
{{shift_request.description|truncatechars:30}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% trans "Employee" %}
+
+
{% trans "Requested Shift" %}
+
{% trans "Previous/Current Shift" %}
+
{% trans "Requested Date" %}
+
{% trans "Requested Till" %}
+
+ {% trans "Status" %}
+
{% trans "Description" %}
+
{% trans "Comment" %}
+
{% trans "Actions" %}
+ {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %}
+
{% trans "Confirmation" %}
+ {% endif %}
+
+
+
+ {% for shift_request in data %}
+
+
+
+
+
+
+
+
+
+
+
+ {{shift_request.employee_id}}
+
+
+
{{shift_request.shift_id}}
+
{{shift_request.previous_shift_id}}
+
+
+ {{shift_request.requested_date}}
+
+ {{shift_request.requested_till}}
+
+ {% if shift_request.approved %}
+ {% trans "Approved" %}
+ {% elif shift_request.canceled %}
+ {% trans "Rejected" %}
+ {% else %}
+ {% trans "Requested" %}
+ {% endif %}
+
+ {% if request.user.employee_get == shift_request.employee_id or perms.base.change_shiftrequest or perms.base.add_shiftrequest or perms.base.delete_shiftrequest or request.user|is_reportingmanager %}
+
+ {% if request.user.employee_get == shift_request.employee_id or perms.base.change_shiftrequest or request.user|is_reportingmanager %}
+ {% if shift_request.approved == False and not shift_request.canceled %}
+
+ {% else %}
+
+ {% endif %}
+ {% endif %}
+ {% if request.user.employee_get == shift_request.employee_id or perms.base.add_shiftrequest or request.user|is_reportingmanager %}
+
+
+
+ {% endif %}
+ {% if request.user.employee_get == shift_request.employee_id or perms.base.delete_shiftrequest or request.user|is_reportingmanager %}
+ {% if shift_request.approved == False and shift_request.canceled == False %}
+
+ {% csrf_token %}
+
+
+ {% elif perms.base.delete_shiftrequest or request.user|is_reportingmanager %}
+
+ {% csrf_token %}
+
+
+ {% else %}
+
+ {% endif %}
+ {% endif %}
+
+ {% endif %}
+
+ {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %}
+