From 44b50ef3cf9ab39a8869ec57a6c6c8ff8238e707 Mon Sep 17 00:00:00 2001 From: Horilla Date: Thu, 15 Feb 2024 12:17:25 +0530 Subject: [PATCH] [UPDT] LEAVE: Changed leave cancellation approve button --- .../leave/leave_request/leave_requests.html | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/leave/templates/leave/leave_request/leave_requests.html b/leave/templates/leave/leave_request/leave_requests.html index 4bf30664e..d965162ea 100644 --- a/leave/templates/leave/leave_request/leave_requests.html +++ b/leave/templates/leave/leave_request/leave_requests.html @@ -163,6 +163,21 @@
+ {% if leave_request.status == 'cancelled' %} + {% if leave_request.end_date >= current_date %} + + + + {% else %} + + + + {% endif %} + {% else %} {% if leave_request.is_approved and leave_request.status == 'requested' and leave_request.end_date >= current_date %} current_date.month %} onclick = "leaveRequestConfirm('This leave request is for the month of {{leave_request.start_date|date:'F'}}. Approval depends on the {{leave_request.employee_id.get_full_name}} having available leave days for this month.',event);" {% else %} onclick = "return confirm('Do You really want to Approve this request?')"; {% endif %}> @@ -175,7 +190,7 @@ {% endif %} - {% if leave_request.status != 'rejected' and leave_request.status != 'cancelled_and_rejected' and leave_request.end_date >= current_date %} + {% if leave_request.status != 'rejected' and leave_request.end_date >= current_date %} @@ -190,6 +205,8 @@ {% endif %} + + {% endif %}