fix(hse): remove syntax error in javascript and restore tambah, ekspor, and impor button functionality
This commit is contained in:
@@ -1409,11 +1409,17 @@
|
|||||||
|
|
||||||
document.getElementById('editForm').action = `/hse/employees/${emp.id}`;
|
document.getElementById('editForm').action = `/hse/employees/${emp.id}`;
|
||||||
document.getElementById('editModal').classList.remove('hidden');
|
document.getElementById('editModal').classList.remove('hidden');
|
||||||
|
document.documentElement.classList.add('modal-open');
|
||||||
|
document.body.classList.add('modal-open');
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeEditModal() {
|
function closeEditModal() {
|
||||||
const modal = document.getElementById('editModal');
|
const modal = document.getElementById('editModal');
|
||||||
if (modal) modal.classList.add('hidden');
|
if (modal) {
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
document.documentElement.classList.remove('modal-open');
|
||||||
|
document.body.classList.remove('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const allMasterSimperTypes = @json($availableSimperTypes ?? []);
|
const allMasterSimperTypes = @json($availableSimperTypes ?? []);
|
||||||
@@ -1602,6 +1608,8 @@
|
|||||||
|
|
||||||
document.getElementById('renewForm').action = `/hse/employees/${emp.id}`;
|
document.getElementById('renewForm').action = `/hse/employees/${emp.id}`;
|
||||||
document.getElementById('renewModal').classList.remove('hidden');
|
document.getElementById('renewModal').classList.remove('hidden');
|
||||||
|
document.documentElement.classList.add('modal-open');
|
||||||
|
document.body.classList.add('modal-open');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRenewSimperTypeChange(val) {
|
function onRenewSimperTypeChange(val) {
|
||||||
@@ -1699,11 +1707,11 @@
|
|||||||
|
|
||||||
function closeRenewModal() {
|
function closeRenewModal() {
|
||||||
const modal = document.getElementById('renewModal');
|
const modal = document.getElementById('renewModal');
|
||||||
if (modal) modal.classList.add('hidden');
|
if (modal) {
|
||||||
currentRenewEmployee = null;
|
modal.classList.add('hidden');
|
||||||
}
|
document.documentElement.classList.remove('modal-open');
|
||||||
const modal = document.getElementById('renewModal');
|
document.body.classList.remove('modal-open');
|
||||||
if (modal) modal.classList.add('hidden');
|
}
|
||||||
currentRenewEmployee = null;
|
currentRenewEmployee = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1712,12 +1720,20 @@
|
|||||||
document.getElementById('deleteEmployeeNik').textContent = nik;
|
document.getElementById('deleteEmployeeNik').textContent = nik;
|
||||||
document.getElementById('deleteEmployeeForm').action = `/hse/employees/${id}`;
|
document.getElementById('deleteEmployeeForm').action = `/hse/employees/${id}`;
|
||||||
const modal = document.getElementById('deleteEmployeeModal');
|
const modal = document.getElementById('deleteEmployeeModal');
|
||||||
if (modal) modal.classList.remove('hidden');
|
if (modal) {
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
document.documentElement.classList.add('modal-open');
|
||||||
|
document.body.classList.add('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDeleteEmployeeModal() {
|
function closeDeleteEmployeeModal() {
|
||||||
const modal = document.getElementById('deleteEmployeeModal');
|
const modal = document.getElementById('deleteEmployeeModal');
|
||||||
if (modal) modal.classList.add('hidden');
|
if (modal) {
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
document.documentElement.classList.remove('modal-open');
|
||||||
|
document.body.classList.remove('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pencarian Server-side Otomatis (Global ke seluruh database)
|
// Pencarian Server-side Otomatis (Global ke seluruh database)
|
||||||
@@ -1805,11 +1821,19 @@
|
|||||||
});
|
});
|
||||||
const addSimperDateInp = document.getElementById('addSimperDateInput');
|
const addSimperDateInp = document.getElementById('addSimperDateInput');
|
||||||
if (addSimperDateInp) addSimperDateInp.value = '';
|
if (addSimperDateInp) addSimperDateInp.value = '';
|
||||||
if (modal) modal.classList.remove('hidden');
|
if (modal) {
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
document.documentElement.classList.add('modal-open');
|
||||||
|
document.body.classList.add('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function closeAddKaryawanModal() {
|
function closeAddKaryawanModal() {
|
||||||
const modal = document.getElementById('addKaryawanModal');
|
const modal = document.getElementById('addKaryawanModal');
|
||||||
if (modal) modal.classList.add('hidden');
|
if (modal) {
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
document.documentElement.classList.remove('modal-open');
|
||||||
|
document.body.classList.remove('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function toggleAddSimperDate(val) {
|
function toggleAddSimperDate(val) {
|
||||||
const wrapper = document.getElementById('addSimperDateWrapper');
|
const wrapper = document.getElementById('addSimperDateWrapper');
|
||||||
@@ -1835,11 +1859,19 @@
|
|||||||
// Modal Impor Karyawan via Excel
|
// Modal Impor Karyawan via Excel
|
||||||
function openImportKaryawanModal() {
|
function openImportKaryawanModal() {
|
||||||
const modal = document.getElementById('importKaryawanModal');
|
const modal = document.getElementById('importKaryawanModal');
|
||||||
if (modal) modal.classList.remove('hidden');
|
if (modal) {
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
document.documentElement.classList.add('modal-open');
|
||||||
|
document.body.classList.add('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function closeImportKaryawanModal() {
|
function closeImportKaryawanModal() {
|
||||||
const modal = document.getElementById('importKaryawanModal');
|
const modal = document.getElementById('importKaryawanModal');
|
||||||
if (modal) modal.classList.add('hidden');
|
if (modal) {
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
document.documentElement.classList.remove('modal-open');
|
||||||
|
document.body.classList.remove('modal-open');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function handleImportFileChange(input) {
|
function handleImportFileChange(input) {
|
||||||
const display = document.getElementById('importFileName');
|
const display = document.getElementById('importFileName');
|
||||||
|
|||||||
Reference in New Issue
Block a user