[UPDT] ATTENDANCE: Updated attendnace break point nav to cbv and formatted the page

This commit is contained in:
Horilla
2025-10-22 15:13:02 +05:30
parent d2f887baae
commit 93b54b9eec

View File

@@ -1,11 +1,26 @@
{% extends 'settings.html' %}
{% load i18n %}
{% load i18n static %}
{% block settings %}
{% load static %}
{% include "generic/components.html" %}
<div id="ohMessages"></div>
<div class="oh-inner-sidebar-content" id="attendanceValidationConditions">
<div hx-get="{% url 'break-point-navbar' %}" hx-trigger="load"></div>
<div
class="oh-checkpoint-badge mb-2"
id="selectedInstances"
data-ids="[]"
data-clicked=""
style="display: none"
></div>
<div class="oh-wrapper" hx-get="{% url "break-point-list" %}?{{request.GET.urlencode}}"
hx-trigger="load" id="listContainer"
>
<div class="animated-background">
</div>
</div>
{% comment %} <div class="oh-inner-sidebar-content" id="attendanceValidationConditions">
<div class="oh-inner-sidebar-content__header d-flex justify-content-between align-items-center">
<h2 class="oh-inner-sidebar-content__title">{% trans 'Break Point Condition' %}</h2>
{% if not condition and perms.attendance.add_attendancevalidationcondition%}
@@ -19,8 +34,8 @@
{% endif %}
</div>
</div>
{% comment %} {% if condition %} {% endcomment %}
{% comment %} <div class="oh-sticky-table">
{% if condition %}
<div class="oh-sticky-table">
<div class="oh-sticky-table__table oh-table--sortable">
<div class="oh-sticky-table__thead">
<div class="oh-sticky-table__tr">
@@ -40,26 +55,14 @@
<div class="oh-sticky-table__th">{% trans "Actions" %}</div>
{% endif %}
</div>
</div> {% endcomment %}
{% comment %} <div class="oh-sticky-table__tbody"> {% endcomment %}
{% comment %} {% if condition != None %} {% endcomment %}
<div
class="oh-checkpoint-badge mb-2"
id="selectedInstances"
data-ids="[]"
data-clicked=""
style="display: none"
></div>
<div class="oh-wrapper" hx-get="{% url "break-point-list" %}?{{request.GET.urlencode}}"
hx-trigger="load" id="listContainer">
<div class="animated-background">
</div>
</div>
{% comment %} <div class="oh-sticky-table__tr" draggable="true">
</div>
<div class="oh-sticky-table__tbody">
{% if condition != None %}
<div class="oh-sticky-table__tr" draggable="true">
<div class="oh-sticky-table__td">{{ condition.validation_at_work }}</div>
<div class="oh-sticky-table__td">{{ condition.minimum_overtime_to_approve }}</div>
<div class="oh-sticky-table__td">{{ condition.overtime_cutoff }}</div> {% endcomment %}
{% comment %} {% if perms.attendance.change_attendancevalidationcondition %}
<div class="oh-sticky-table__td">{{ condition.overtime_cutoff }}</div>
{% if perms.attendance.change_attendancevalidationcondition %}
<div class="oh-sticky-table__td">{{ condition.overtime_cutoff }}</div>
<div class="oh-sticky-table__td">{{ condition.auto_approve_ot|yesno:"Yes,No" }}</div>
{% if perms.attendance.change_attendancevalidationcondition %}
@@ -68,18 +71,18 @@
hx-target="#objectUpdateModalTarget" type="button" class="oh-btn oh-btn--info"
data-toggle="oh-modal-toggle" data-target="#objectUpdateModal">{% trans 'Edit' %}</a>
</div>
{% endif %} {% endcomment %}
{% comment %} </div> {% endcomment %}
{% comment %} {% endif %} {% endcomment %}
{% comment %} </div> {% endcomment %}
{% comment %}
{% endif %}
</div>
{% endif %}
</div>
</div>
</div> {% endcomment %}
{% comment %} {% else %}
</div>
{% else %}
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%;">
<img style="display: block; width: 15%; margin: 20px auto; filter: opacity(0.5);"
src="{% static 'images/ui/conditions.png' %}" class="" alt="Page not found. 404." />
<h5 class="oh-404__subtitle">{% trans "There is no attendance conditions at this moment." %}</h5>
</div> {% endcomment %}
{% comment %} {% endif %} {% endcomment %}
</div>
{% endif %} {% endcomment %}
{% endblock %}