[FIX] GENERAL: Fixed sortby field names

This commit is contained in:
Horilla
2024-04-08 15:17:38 +05:30
parent 5428a5e44b
commit 32389ed002
3 changed files with 14 additions and 24 deletions

View File

@@ -35,14 +35,14 @@
</div>
</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'employee_id__employee_first_name' %}arrow-down {% else %} arrow-up-down {% endif %}" scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=employee_id__employee_first_name">{% trans "Employee" %}</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'type' %} arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="1" data-cell-title='{% trans "Type" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=type">{% trans "Type" %}</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'attendance_id__attendance_date' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="2" data-cell-title='{% trans "Attendance Date" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=attendance_id__attendance_date">{% trans "Attendance Date" %}</div>
<div class="oh-sticky-table__th " data-cell-index="3" data-cell-title='{% trans "Check-In" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=">{% trans "Check-In" %}</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'attendance_id__attendance_clock_in_date' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="4" data-cell-title='{% trans "In-Date" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=attendance_id__attendance_clock_in_date">{% trans "In Date" %}</div>
<div class="oh-sticky-table__th " data-cell-index="5" data-cell-title='{% trans "Check-Out" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=">{% trans "Check-Out" %}</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'attendance_id__attendance_clock_out_date' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="6" data-cell-title='{% trans "Out-Date" %}' 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 {% if request.sort_option.order == '-type' %}arrow-up {% elif request.sort_option.order == 'type' %} arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="1" data-cell-title='{% trans "Type" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=type">{% trans "Type" %}</div>
<div style="width:170px" class="oh-sticky-table__th {% if request.sort_option.order == '-attendance_id__attendance_date' %}arrow-up {% elif request.sort_option.order == 'attendance_id__attendance_date' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="2" data-cell-title='{% trans "Attendance Date" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=attendance_id__attendance_date">{% trans "Attendance Date"%}</div>
<div class="oh-sticky-table__th" data-cell-index="3" data-cell-title='{% trans "Check-In" %}' scope="col">{% trans "Check-In" %}</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-attendance_id__attendance_clock_in_date' %}arrow-up {% elif request.sort_option.order == 'attendance_id__attendance_clock_in_date' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="4" data-cell-title='{% trans "In-Date" %}' scope="col" hx-target='#report-container' hx-get="{% url 'late-come-early-out-search' %}?{{pd}}&sortby=attendance_id__attendance_clock_in_date">{% trans "In Date" %}</div>
<div class="oh-sticky-table__th" data-cell-index="5" data-cell-title='{% trans "Check-Out" %}' scope="col">{% trans "Check-Out" %}</div>
<div class="oh-sticky-table__th {% if request.sort_option.order == '-attendance_id__attendance_clock_out_date' %}arrow-up {% elif request.sort_option.order == 'attendance_id__attendance_clock_out_date' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="6" data-cell-title='{% trans "Out-Date" %}' 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 " data-cell-index="7" data-cell-title='{% trans "Min Hour" %}' 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 {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'attendance_id__at_work_second' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="8" data-cell-title='{% trans "At Work" %}' 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 {% if request.sort_option.order == '-attendance_id__at_work_second' %}arrow-up {% elif request.sort_option.order == 'attendance_id__at_work_second' %}arrow-down {% else %} arrow-up-down {% endif %}" data-cell-index="8" data-cell-title='{% trans "At Work" %}' 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" data-cell-index="9" data-cell-title='{% trans "Penalties" %}' scope="col">{% trans "Penalties" %}</div>
{% if request.user|is_reportingmanager or perms.attendance.chanage_penaltyaccount or perms.attendance.delete_attendancelatecomeearlyout %}
<div class="oh-sticky-table__th oh-sticky-table__right" scope="col" style="width: 150px;">{% trans "Actions" %}</div>

View File

@@ -106,16 +106,12 @@
<div
data-cell-index="2" data-cell-title='{% trans "Day" %}'
class="oh-sticky-table__th"
hx-target="#attendance-container"
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby="
>
{% trans "Day" %}
</div>
<div
data-cell-index="3" data-cell-title='{% trans "Check-In" %}'
class="oh-sticky-table__th"
hx-target="#attendance-container"
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby="
>
{% trans "Check-In" %}
</div>
@@ -129,9 +125,9 @@
</div>
<div
data-cell-index="5" data-cell-title='{% trans "Check-Out" %}'
class="oh-sticky-table__th {% if request.sort_option.order == 'employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == '=' %}arrow-down {% else %} arrow-up-down {% endif %}"
class="oh-sticky-table__th {% if request.sort_option.order == '-attendance_clock_out' %}arrow-up {% elif request.sort_option.order == 'attendance_clock_out' %}arrow-down {% else %} arrow-up-down {% endif %}"
hx-target="#attendance-container"
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby="
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby=attendance_clock_out"
>
{% trans "Check-Out" %}
</div>
@@ -146,24 +142,18 @@
<div
data-cell-index="7" data-cell-title='{% trans "Shift" %}'
class="oh-sticky-table__th"
hx-target="#attendance-container"
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby="
>
{% trans "Shift" %}
</div>
<div
data-cell-index="8" data-cell-title='{% trans "Work Type" %}'
class="oh-sticky-table__th"
hx-target="#attendance-container"
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby="
>
{% trans "Work Type" %}
</div>
<div
data-cell-index="9" data-cell-title='{% trans "Min Hour" %}'
class="oh-sticky-table__th"
hx-target="#attendance-container"
hx-get="{% url 'own-attendance-filter' %}?{{pd}}&orderby="
>
{% trans "Min Hour" %}
</div>

View File

@@ -35,11 +35,11 @@
</div>
</div>
<div data-cell-index="1" data-cell-title="{% trans "Employee" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'employee_id__employee_first_name' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=employee_id__employee_first_name" >{% trans "Employee" %}</div>
<div data-cell-index="2" data-cell-title="{% trans "Leave Type" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'leave_type_id' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=leave_type_id" >{% trans "Leave Type" %}</div>
<div data-cell-index="3" data-cell-title="{% trans "Available Days" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'available_days' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=available_days" >{% trans "Available Days" %}</div>
<div data-cell-index="4" data-cell-title="{% trans "Carryforward Days" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'carryforward_days' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=carryforward_days" >{% trans "Carryforward Days" %}</div>
<div data-cell-index="5" data-cell-title="{% trans "Leave Days" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'total_leave_days' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=total_leave_days" >{% trans "Total Leave Days" %}</div>
<div data-cell-index="6" data-cell-title="{% trans "Assigned Date" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-employee_id__employee_first_name' %}arrow-up {% elif request.sort_option.order == 'assigned_date' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=assigned_date" >{% trans "Assigned Date" %}</div>
<div data-cell-index="2" data-cell-title="{% trans "Leave Type" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-leave_type_id' %}arrow-up {% elif request.sort_option.order == 'leave_type_id' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=leave_type_id" >{% trans "Leave Type" %}</div>
<div data-cell-index="3" data-cell-title="{% trans "Available Days" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-available_days' %}arrow-up {% elif request.sort_option.order == 'available_days' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=available_days" >{% trans "Available Days" %}</div>
<div data-cell-index="4" data-cell-title="{% trans "Carryforward Days" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-carryforward_days' %}arrow-up {% elif request.sort_option.order == 'carryforward_days' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=carryforward_days" >{% trans "Carryforward Days" %}</div>
<div data-cell-index="5" data-cell-title="{% trans "Leave Days" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-total_leave_days' %}arrow-up {% elif request.sort_option.order == 'total_leave_days' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=total_leave_days" >{% trans "Total Leave Days" %}</div>
<div data-cell-index="6" data-cell-title="{% trans "Assigned Date" %}" class="oh-sticky-table__th {% if request.sort_option.order == '-assigned_date' %}arrow-up {% elif request.sort_option.order == 'assigned_date' %}arrow-down {% else %}arrow-up-down {% endif %}" hx-target='#assignedLeaves' hx-get="{% url 'assign-filter' %}?{{pd}}&sortby=assigned_date" >{% trans "Assigned Date" %}</div>
{% if perms.leave.change_availableleave or perms.leave.delete_availableleave or request.user|is_reportingmanager %}
<div class="oh-sticky-table__th">{% trans "Actions" %}</div>
{% endif %}