[FIX] ATTENDACE: Column toggle not working on refresh

This commit is contained in:
Horilla
2024-02-21 11:06:54 +05:30
parent 61df1f1dd2
commit 15aea5d9df

View File

@@ -39,8 +39,8 @@
<div class='oh-sticky-table__th' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=attendance_id__attendance_clock_out_date">{% trans "Out Date" %}</div>
<div class='oh-sticky-table__th' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=">{% trans "Min Hour" %}</div>
<div class='oh-sticky-table__th' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=attendance_id__at_work_second">{% trans "At Work" %}</div>
<div class='oh-sticky-table__th' scope="col" style="width: 150px;">{% trans "Actions" %}</div>
<div class='oh-sticky-table__th' scope="col">{% trans "Penalties" %}</div>
<div class='oh-sticky-table__th oh-sticky-table__right' scope="col" style="width: 150px;">{% trans "Actions" %}</div>
</div>
</div>
<div class="oh-sticky-table__tbody">
@@ -79,8 +79,12 @@
<div class='oh-sticky-table__td dateformat_changer'>{{late_in_early_out.attendance_id.attendance_clock_out_date}}</div>
<div class='oh-sticky-table__td'>{{late_in_early_out.attendance_id.minimum_hour}}</div>
<div class='oh-sticky-table__td'>{{late_in_early_out.attendance_id.attendance_worked_hour}}</div>
<div class="oh-sticky-table__td">
<div class='oh-sticky-table__td'>
{% if late_in_early_out.get_penalties_count %}
<div class="" data-target="#penaltyViewModal" data-toggle="oh-modal-toggle" hx-get="{% url "view-penalties" %}?late_early_id={{late_in_early_out.id}}" hx-target="#penaltyViewModalBody" align="center" style="background-color: rgba(229, 79, 56, 0.036); border: 2px solid rgb(229, 79, 56); border-radius: 18px; padding: 10px; font-weight: bold; width: 85%;">Penalties :{{late_in_early_out.get_penalties_count}}</div>
{% endif %}
</div>
<div class="oh-sticky-table__td oh-sticky-table__right">
<div class="oh-btn-group">
{% if request.user|is_reportingmanager or perms.attendance.chanage_penaltyaccount %}
<button
@@ -105,11 +109,7 @@
{% endif %}
</div>
</div>
<div class='oh-sticky-table__td'>
{% if late_in_early_out.get_penalties_count %}
<div class="" data-target="#penaltyViewModal" data-toggle="oh-modal-toggle" hx-get="{% url "view-penalties" %}?late_early_id={{late_in_early_out.id}}" hx-target="#penaltyViewModalBody" align="center" style="background-color: rgba(229, 79, 56, 0.036); border: 2px solid rgb(229, 79, 56); border-radius: 18px; padding: 10px; font-weight: bold; width: 85%;">Penalties :{{late_in_early_out.get_penalties_count}}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>