[UPDT] BASE: Updated shift template script

This commit is contained in:
Horilla
2024-02-21 10:42:36 +05:30
parent 793be9d355
commit b33879d8ab
4 changed files with 23 additions and 3 deletions

View File

@@ -675,8 +675,11 @@
if (selectedCount === 0) {
$("#selectedShowShifts").css("display", "none");
$("#exportShifts").css("display", "none");
$("#unselectAllShifts").css("display", "none");
} else {
$("#exportShifts").css("display", "inline-flex");
$("#unselectAllShifts").css("display", "inline-flex");
$("#selectedShowShifts").css("display", "inline-flex");
$("#selectedShowShifts").text(selectedCount + " - " + message);
}
@@ -685,7 +688,10 @@
$(document).ready(function () {
$(".all-shift-requests-row").change(function () {
addingShiftIds();
if ($('.all-shift-requests').is(":checked")) {
$(".all-shift-requests").prop("checked", false);
}
addingShiftIds();
});
$(".all-shift-requests").change(function () {

View File

@@ -575,10 +575,12 @@
var message = rowMessages[languageCode];
$("#selectedShifts").attr("data-ids", JSON.stringify(ids));
if (selectedCount === 0) {
$("#selectedShowShifts").css("display", "none");
$("#exportShifts").css("display", "none");
$("#unselectAllShifts").css("display", "none");
$("#selectedShowShifts").css("display", "none");
} else {
$("#exportShifts").css("display", "inline-flex");
$("#unselectAllShifts").css("display", "inline-flex");
$("#selectedShowShifts").css("display", "inline-flex");
$("#selectedShowShifts").text(selectedCount + " - " + message);
}
@@ -587,6 +589,9 @@
$(document).ready(function () {
$(".all-shift-requests-row").change(function () {
if ($('.all-shift-requests').is(":checked")) {
$(".all-shift-requests").prop("checked", false);
}
addingShiftIds();
});

View File

@@ -47,7 +47,8 @@
<div
class="oh-checkpoint-badge text-secondary mb-2"
id="unselectAllShifts"
style="cursor: pointer"
style="cursor: pointer;
display:none;"
>
{% trans "Unselect All Shifts" %}
</div>