From 7f8096330500f8dc7d10b015804a9ea60136bb10 Mon Sep 17 00:00:00 2001 From: Horilla Date: Thu, 22 Feb 2024 11:26:13 +0530 Subject: [PATCH] [UPDT] ATTENDANCE: Updates late come early out select all instance method --- attendance/static/attendance/actions.js | 8 +++++++- .../templates/attendance/late_come_early_out/reports.html | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/attendance/static/attendance/actions.js b/attendance/static/attendance/actions.js index 8b529aefb..153c58150 100644 --- a/attendance/static/attendance/actions.js +++ b/attendance/static/attendance/actions.js @@ -198,7 +198,6 @@ function ticklatecomeCheckboxes() { if (click === "1") { $(".all-latecome").prop("checked", true); } - uniqueIds.forEach(function (id) { $("#" + id).prop("checked", true); }); @@ -207,12 +206,14 @@ function ticklatecomeCheckboxes() { languageCode = code; var message = rowMessages[languageCode]; if (selectedCount > 0) { + $("#unselectAllLatecome").css("display", "inline-flex"); $("#exportLatecome").css("display", "inline-flex"); $("#selectedShowLatecome").css("display", "inline-flex"); $("#selectedShowLatecome").text(selectedCount + " -" + message); } else { $("#selectedShowLatecome").css("display", "none"); $("#exportLatecome").css("display", "none"); + $("#unselectAllLatecome").css("display", "none"); } }); } @@ -470,8 +471,10 @@ function addinglatecomeIds() { if (selectedCount === 0) { $("#selectedShowLatecome").css("display", "none"); $("#exportLatecome").css("display", "none"); + $("#unselectAllLatecome").css("display", "none"); } else { $("#exportLatecome").css("display", "inline-flex"); + $("#unselectAllLatecome").css("display", "inline-flex"); $("#selectedShowLatecome").css("display", "inline-flex"); $("#selectedShowLatecome").text(selectedCount + " - " + message); } @@ -631,6 +634,9 @@ $("#attendance-info-import").click(function (e) { }); $(".all-latecome-row").change(function () { + if ($(".all-latecome").is(":checked")) { + $(".all-latecome").prop("checked", false); + } addinglatecomeIds(); }); diff --git a/attendance/templates/attendance/late_come_early_out/reports.html b/attendance/templates/attendance/late_come_early_out/reports.html index 610bcbe71..da0168110 100644 --- a/attendance/templates/attendance/late_come_early_out/reports.html +++ b/attendance/templates/attendance/late_come_early_out/reports.html @@ -10,10 +10,10 @@
{% trans 'Select All Attendance' %}
-
+ -
+
@@ -35,4 +35,5 @@
+ {% endblock %}