| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/erp/employee/templates/ |
Upload File : |
<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>