[FIX] HORILLA_THEME: Fix check in button disappearing when time is disabled

This commit is contained in:
Horilla
2025-12-20 11:57:08 +05:30
parent ee4c3eb35f
commit faef77b1b6
2 changed files with 5 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
{% load static horillafilters attendancefilters i18n %}
{% if request.user.employee_get %}
{% with get_forecasted_at_work=request.user.employee_get.get_forecasted_at_work %}
{% if request.session.selected_company == "all" or request.user.employee_get.employee_work_info.company_id.id == request.session.selected_company|default:"-1"|add:"0" %}
@@ -24,7 +25,7 @@
>
<span class="date">
<i class="fa-solid fa-right-from-bracket pe-2"></i>
<div class="time-runner"></div>
<div class="time-runner">{% trans "Check Out" %}</div>
</span>
<span class="con hr-Check-In-out-text" {% if enabled_timerunner and get_forecasted_at_work.has_attendance %} style="display:none;" {% endif %}>
{% trans "Check Out" %}
@@ -55,7 +56,7 @@
>
<span class="date">
<i class="fa-solid fa-right-to-bracket pe-2"></i>
<div class="at-work-seconds"></div>
<div class="at-work-seconds">{% trans "Check In" %}</div>
</span>
<span class="con hr-Check-In-out-text" {% if enabled_timerunner %} style="display:none;" {% endif %}>
{% trans "Check In" %}
@@ -81,6 +82,7 @@
{% endwith %}
{% endif %}
{% if enabled_timerunner %}
<script>
var at_work_seconds = $(".at_work_seconds").data("at-work-seconds");
var run = $(".at_work_seconds").data("run");
@@ -117,3 +119,4 @@
}, 1000);
}
</script>
{% endif %}

View File

@@ -21,18 +21,13 @@
</div>
{% endif %}
<!-- Right side - Search and Actions -->
<div class="flex items-center gap-8">
<!-- Action Icons -->
<div class="flex items-center gap-2">
{% if "attendance"|app_installed %}
{% if enabled_timerunner %}
<div id="attendance-activity-container">
{% include "attendance/components/in_out_component.html" %}
</div>
{% endif %}
{% endif %}
<button
class="md:block p-2 group text-primary-600 w-12 h-12 bg-primary-100 hover:bg-primary-600 rounded-full transition duration-300 flex items-center justify-center"