ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/app/NH-HR-test/mb/scripts
/
home
mhhtmff
app
NH-HR-test
mb
scripts
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
bacheca.js
2.85 MB
chmod
View
DL
Edit
Rename
Delete
bootstrap.min.js
216.1 MB
chmod
View
DL
Edit
Rename
Delete
custom.js
88.73 MB
chmod
View
DL
Edit
Rename
Delete
globals.js
1.04 MB
chmod
View
DL
Edit
Rename
Delete
login.js
8.03 MB
chmod
View
DL
Edit
Rename
Delete
permission.js
10.14 MB
chmod
View
DL
Edit
Rename
Delete
profile.js
9.22 MB
chmod
View
DL
Edit
Rename
Delete
stamp.js
17.93 MB
chmod
View
DL
Edit
Rename
Delete
transfer.js
8.74 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/app/NH-HR-test/mb/scripts/transfer.js
function sendTransfer(type, id) { document.querySelector('#send_transfer_button').style.display = 'none'; var transfer_start_date = document.querySelector('#transfer_start_date').value; var transfer_end_date = document.querySelector('#transfer_end_date').value; var transfer_location = document.querySelector('#transfer_location').value; var transfer_destination = document.querySelector('#transfer_destination').value; var error = false; if(transfer_start_date == "") { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "La richiesta deve avere una data inizio" }); document.querySelector('#send_transfer_button').style.display = 'block'; exit; } if(transfer_end_date == "") { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "La richiesta deve avere una data fine" }); document.querySelector('#send_transfer_button').style.display = 'block'; exit; } if(transfer_location == "") { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "La richiesta deve avere italia o estero" }); document.querySelector('#send_transfer_button').style.display = 'block'; exit; } if(transfer_destination == "") { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "La richiesta deve avere una destinazione" }); document.querySelector('#send_transfer_button').style.display = 'block'; exit; } if(type == "create") { $.ajax({ type: "POST", url: "php/transfer/send_new_transfer.php", data: { transfer_start_date: transfer_start_date, transfer_end_date: transfer_end_date, transfer_location: transfer_location, transfer_destination: transfer_destination }, success: function (res) { if (res === 'error') { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "Errore: " + res }); document.querySelector('#send_transfer_button').style.display = 'block'; exit; } else { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "success", title: "Trasferta richiesta" }); openTransfersList(); } } }); } else if(type == "edit") { $.ajax({ type: "POST", url: "php/transfer/edit_transfer.php", data: { id: id, transfer_start_date: transfer_start_date, transfer_end_date: transfer_end_date, transfer_location: transfer_location, transfer_destination: transfer_destination }, success: function (res) { if (res === 'error') { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "Errore: " + res }); document.querySelector('#send_transfer_button').style.display = 'block'; exit; } else { const Toast = Swal.mixin({ toast: true, position: "bottom", showConfirmButton: false, timer: 3000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "success", title: "Trasferta modificata" }); openTransferDetails(id); } } }); } } function deleteTransfer(id) { Swal.fire({ title: "Eliminare la trasferta?", showDenyButton: false, showCancelButton: true, cancelButtonText: "Annulla", confirmButtonText: "Elimina", confirmButtonColor: "black", denyButtonText: `No` }).then((result) => { if (result.value == true) { $.ajax({ type: "POST", url: "php/transfer/delete_transfer.php", data: { id : id }, success: function (res) { if (res === 'error') { const Toast = Swal.mixin({ toast: true, position: "top-end", showConfirmButton: false, timer: 5000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "error", title: "Si è verificato un errore" }); } else { const Toast = Swal.mixin({ toast: true, position: "top-end", showConfirmButton: false, timer: 5000, timerProgressBar: true, didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; } }); Toast.fire({ icon: "success", title: "Eliminata con successo" }); openTransfersList(); } } }); } }); } function editTransfer(id) { window.location.href = "edit_transfer.php?id="+id; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply