[UPDT] HORILLA: Prevent duplicate select2 event triggers on HTMX updates
This commit is contained in:
@@ -24,10 +24,3 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2322,9 +2322,9 @@ def zk_biometric_attendance_bulk_logs(devices):
|
||||
datetime=date_time,
|
||||
)
|
||||
try:
|
||||
if punch_code in {0, 3, 4, 5}:
|
||||
if punch_code in {0, 3, 4}:
|
||||
clock_in(request_data)
|
||||
elif punch_code in {1, 2}:
|
||||
elif punch_code in {1, 2, 5}:
|
||||
clock_out(request_data)
|
||||
except Exception as error:
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user