[UPDT] ATTENDANCE: Updates late come early out select all instance method

This commit is contained in:
Horilla
2024-02-22 11:26:13 +05:30
parent 01d807ed2a
commit 7f80963305
2 changed files with 10 additions and 3 deletions

View File

@@ -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();
});

View File

@@ -10,10 +10,10 @@
<div class="oh-checkpoint-badge text-success mb-2" id="selectAllLatecome" style="cursor: pointer;">
{% trans 'Select All Attendance' %}
</div>
<div class="oh-checkpoint-badge text-secondary mb-2" id="unselectAllLatecome" style="cursor: pointer;">
<div class="oh-checkpoint-badge text-secondary mb-2" id="unselectAllLatecome" style="cursor: pointer;display: none;">
{% trans 'Unselect All Attendance' %}
</div>
<div class="oh-checkpoint-badge text-info mb-2" id="exportLatecome" style="cursor: pointer;">
<div class="oh-checkpoint-badge text-info mb-2" id="exportLatecome" style="cursor: pointer; display: none;">
{% trans 'Export Attendance' %}
</div>
<div class="oh-checkpoint-badge text-danger mb-2" id="selectedShowLatecome"></div>
@@ -35,4 +35,5 @@
<div class="oh-modal__dialog-body" id="penaltyViewModalBody"></div>
</div>
</div>
{% endblock %}