[UPDT] EMPLOYEE: Updated birthdays_container div class style and change file structure

This commit is contained in:
Horilla
2025-05-15 15:14:57 +05:30
parent e6b748a024
commit 7a83920581
5 changed files with 14 additions and 83 deletions

View File

@@ -1,6 +1,6 @@
{% load i18n %}
{% if birthdays %}
<div class="oh-dashboard__events">
<div class="oh-dashboard__events w-100">
<div class="oh-dashbaord__events-reel w-100" id="birthdayContainer" style="transform: translateX(0%);">
{% for birthday in birthdays %}
<div class="oh-dashboard__event" style="background-color: rgb(231, 76, 60);">
@@ -20,11 +20,11 @@
</div>
<ul class="oh-dashboard__events-nav" id="birthdayDots">
{% for birthday in birthdays %}
<li onclick="moveSlider(event)"
class="oh-dashboard__events-nav-item {% if forloop.first %}oh-dashboard__events-nav-item--active{% endif %}"
<li onclick="moveSlider(event)"
class="oh-dashboard__events-nav-item {% if forloop.first %}oh-dashboard__events-nav-item--active{% endif %}"
data-target="{{ forloop.counter0 }}">
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}

View File

@@ -30,11 +30,10 @@
</div>
{% else %}
<div class="oh-empty h-100">
<p class="oh-empty__message">
<img style="display: block;width: 70px;margin: 20px auto ;" src="{% static "/images/ui/no_records.svg" %}" class="" alt=""/>
{% trans "No records available at the moment." %}
</p>
</div>
<img src="{% static 'images/ui/search.svg' %}" class="oh-404__image" alt="Page not found. 404." />
<h1 class="oh-empty__title">{% trans "No Records found." %}</h1>
<p class="oh-empty__subtitle">{% trans "No records available at the moment." %}</p>
</div>
{% endif %}
{% if employees.has_previous or employees.has_next %}
<div class="float-end mt-3 mb-3">

View File

@@ -34,9 +34,8 @@
</div>
{% else %}
<div class="oh-empty h-100">
<p class="oh-empty__message">
<img style="display: block;width: 70px;margin: 20px auto ;" src="{% static "/images/ui/no_records.svg" %}" class="" alt=""/>
{% trans "No records available at the moment." %}
</p>
<img src="{% static 'images/ui/search.svg' %}" class="oh-404__image" alt="Page not found. 404." />
<h1 class="oh-empty__title">{% trans "No Records found." %}</h1>
<p class="oh-empty__subtitle">{% trans "No records available at the moment." %}</p>
</div>
{% endif %}

View File

@@ -1,69 +0,0 @@
<a href="#" class="oh-navbar__notification-link" @click="open = !open" >
<ion-icon name="filter"></ion-icon>
</a>
<div class="oh-navbar__notification-tray border rounded pr-3 pl-3 pb-2" x-data="{markRead: false, visible: true}" x-show="open"
@click.outside="open = false">
<div class="oh-navbar__notification-head pl-0">
<span class="oh-navbar__notification-head-title">Import-Export</span>
</div>
<table class="table">
<tr>
<td>Employee </td>
<td><button id='employee-import' data-toggle="modal" data-target="#employeeImport" class='btn btn-outline-success'>Import</button></td>
<td><a href="{% url 'employee-export' %}" hx-target="#section" class='btn btn-outline-success'>Export</a></td>
</tr>
<tr>
<td>Work Info </td>
<td><button id='work-info-import' data-toggle="modal" data-target="#workInfoImport" class='btn btn-outline-success'>Import</button></td>
<td><a href="{% url 'work-info-export' %}" hx-target="#section" class='btn btn-outline-success'>Export</a></td>
</tr>
</table>
<script>
$('#employee-import').click(function (e) {
$.ajax({
type: 'GET',
url: '/employee/employee-import',
dataType: 'binary',
xhrFields: {
responseType: 'blob'
},
success: function(response) {
const file = new Blob([response], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
const url = URL.createObjectURL(file);
const link = document.createElement('a');
link.href = url;
link.download = 'employee_import_template.xlsx';
document.body.appendChild(link);
link.click();
},
error: function(xhr, textStatus, errorThrown) {
console.error('Error downloading file:', errorThrown);
}
});
});
$('#work-info-import').click(function (e) {
$.ajax({
type: 'GET',
url: '/employee/work-info-import',
dataType: 'binary',
xhrFields: {
responseType: 'blob'
},
success: function(response) {
const file = new Blob([response], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
const url = URL.createObjectURL(file);
const link = document.createElement('a');
link.href = url;
link.download = 'work_info_template.xlsx';
document.body.appendChild(link);
link.click();
},
error: function(xhr, textStatus, errorThrown) {
console.error('Error downloading file:', errorThrown);
}
});
});
</script>
</div>

View File

@@ -2731,7 +2731,9 @@ def get_employees_birthday(request):
}
for emp in employees
]
return render(request, "birthdays_container.html", {"birthdays": birthdays})
return render(
request, "dashboard/birthdays_container.html", {"birthdays": birthdays}
)
@login_required