copy dari repo om Irfan

This commit is contained in:
2026-06-13 16:02:07 +10:00
commit db327c0305
5376 changed files with 2770667 additions and 0 deletions
+490
View File
@@ -0,0 +1,490 @@
<script>
//$(document).ready(function() {
// loadNotif();
// loadFlashNotif();
// $("#alertReminder").hide();
//
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/histori_notif",
// type: "POST",
// dataType: "json",
// data: {},
// success: function(data) {
// $("#not12").html(data.historiNotif);
// }
// });
//
// setInterval(function() {
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/histori_notif",
// type: "POST",
// dataType: "json",
// data: {},
// success: function(data) {
// $("#not12").html(data.historiNotif);
// }
// });
// }, 5000);
//
//});
//$('#btnRemin').click(function() {
// //get Tanggal
// var datew = $('#kalenderRemin').datepicker('getFormattedDate');
// var dt = new Date(datew);
//
// year = dt.getFullYear();
// month = (dt.getMonth() + 1).toString().padStart(2, "0");
// day = dt.getDate().toString().padStart(2, "0");
//
// var tgl = year + "-" + month + "-" + day;
// //get Tanggal
//
// //get Remin txtarea
// var txtRemin = $('#remin').val();
// //get Remin txtarea
//
// if (isNaN(day) || txtRemin == '') {
// $("#alertReminder").show();
// } else {
//
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/save_reminder",
// type: "POST",
// dataType: "json",
// data: {
// tanggal: tgl,
// reminder: txtRemin,
// id_karyawan: <?= $this->session->userdata("id_karyawan") ?>
// },
// success: function(response) {
// console.log(response)
// if (response.value == 1) {
// $("#alertReminder").hide();
// $('#remin').val('');
//
// loadReminder(day, month, year);
// new PNotify({
// title: 'Pemberitahuan',
// text: 'Berhasil menambahkan reminder',
// type: 'success',
// shadow: true,
//
// });
// } else {
// new PNotify({
// title: 'Pemberitahuan',
// text: 'Gagal',
// type: 'error',
// shadow: true,
//
// });
// }
// }
// });
// }
//
//
//});
//$('#kalenderRemin').on('changeDate', function() {
// var datew = $('#kalenderRemin').datepicker('getFormattedDate');
// var dt = new Date(datew);
//
// year = dt.getFullYear();
// month = (dt.getMonth() + 1).toString().padStart(2, "0");
// day = dt.getDate().toString().padStart(2, "0");
//
// // var tgl = day + "/" + month + "/" + year;
// var tgl = year + "/" + month + "/" + day;
//
// // console.log(year + '/' + month + '/' + day);
// loadReminder(day, month, year);
//});
//function loadReminder(day, month, year) {
// var tgl = year + "-" + month + "-" + day;
//
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/getReminder",
// type: "POST",
// dataType: "json",
// data: {
// tanggal: tgl,
// id_karyawan: <?= $this->session->userdata("id_karyawan") ?>
// },
// success: function(response) {
// console.log(response);
// if (response.value == 1) {
// var datre = '';
// $('#uremin').remove();
// datre += '<ul id="uremin">';
// datre += '</ul>';
// $('#dremin').html(datre);
// datre = '';
// for (var i = 0; i < response.dataReminder.length; i++) {
// console.log(response.dataReminder)
// datre += '<li>';
// datre += '<time datetime="">' + day + '/' + month + '/' + year + '</time>';
// datre += '<span>' + response.dataReminder[i]['KET_NOTIFIKASI'] + '</span>';
// datre += '</li>';
//
// }
// $('#uremin').html(datre);
//
// } else {
// var datre = '';
// $('#uremin').remove();
// datre += '<ul id="uremin">';
// datre += '</ul>';
// $('#dremin').html(datre);
//
// datre = '<li>';
// datre += '<time datetime="">' + day + '/' + month + '/' + year + '</time>';
// datre += '<span>--</span>';
// datre += '</li>';
// $('#uremin').html(datre);
// // alert(datre);
// }
// }
// });
//}
//function loadFlashNotif() {
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/flash_notif",
// type: "POST",
// dataType: "json",
// data: 'id_karyawan=<?= $this->session->userdata("id_karyawan") ?>',
// success: function(response) {
// console.log(response);
// if (response.value == 1) {
// for (var i = 0; i < response.dataFlashNotif.length; i++) {
// var txt = null;
// var icn = null;
// var ttl = null;
// if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 1) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'] + " baru dibuat.";
// icn = 'fa fa-shopping-cart';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 2) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'] + " sedang direvisi.";
// icn = 'fa fa-shopping-cart';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 3) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'] + " sudah diprint.";
// icn = 'fa fa-print';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 4) {
// ttl = 'Reminder';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'];
// icn = 'fa fa-calendar';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 5) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'];
// icn = 'fa fa-question';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 6) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'];
// icn = 'fa fa-copy';
// }
//
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/update_log_flash_notif",
// type: "POST",
// dataType: "json",
// data: 'id_log_notifikasi=' + response.dataFlashNotif[i]["ID_LOG_NOTIFIKASI"],
// async: false,
// success: function(responsenew) {
// // set
// if (responsenew.value == 1) {
// new PNotify({
// title: ttl,
// text: txt,
// type: 'info',
// icon: icn,
// shadow: true,
// hide: false,
// buttons: {
// sticker: false
// }
// });
//
// }
// console.log(responsenew);
// }
// });
// }
// }
// }
// });
//
// setInterval(function() {
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/flash_notif",
// type: "POST",
// dataType: "json",
// data: 'id_karyawan=<?= $this->session->userdata("id_karyawan") ?>',
// success: function(response) {
// console.log(response);
// if (response.value == 1) {
// for (var i = 0; i < response.dataFlashNotif.length; i++) {
// var txt = null;
// var icn = null;
// var ttl = null;
// if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 1) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'] + " baru dibuat.";
// icn = 'fa fa-shopping-cart';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 2) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'] + " sedang direvisi.";
// icn = 'fa fa-shopping-cart';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 3) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'] + " sudah diprint.";
// icn = 'fa fa-print';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 4) {
// ttl = 'Reminder';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'];
// icn = 'fa fa-calendar';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 5) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'];
// icn = 'fa fa-question';
// } else if (response.dataFlashNotif[i]['JENIS_NOTIFIKASI'] == 6) {
// ttl = 'Pemberitahuan';
// txt = response.dataFlashNotif[i]['KET_NOTIFIKASI'];
// icn = 'fa fa-copy';
// }
//
//
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/update_log_flash_notif",
// type: "POST",
// dataType: "json",
// data: 'id_log_notifikasi=' + response.dataFlashNotif[i]["ID_LOG_NOTIFIKASI"],
// async: false,
// success: function(responsenew) {
// // set
// if (responsenew.value == 1) {
// new PNotify({
// title: ttl,
// text: txt,
// type: 'info',
// icon: icn,
// shadow: true,
// hide: false,
// buttons: {
// sticker: false
// }
// });
//
// }
// console.log(responsenew);
// }
// });
// }
//
// }
// }
// });
// }, 5000);
//}
//function loadNotif() {
// var jNotif = 0;
//
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/notif",
// type: "POST",
// dataType: "json",
// data: {
// jabatan: '<?= $this->session->userdata("jabatan") ?>',
// id_karyawan: <?= $this->session->userdata("id_karyawan") ?>
// },
// success: function(response) {
// if (response.value == 1) {
// var datnot = '';
// $('#nt').remove();
// datnot += '<ul id="nt">';
// datnot += '</ul>';
// $('#notif').html(datnot);
// console.log(response)
// $("#totalnotif").text(response.dataNotif.length);
// $("#totalnotif2").text(response.dataNotif.length);
// var jd = 5;
// if (response.dataNotif.length < 5) {
// jd = response.dataNotif.length
// } else {
// jd = 5;
// }
// for (var i = 0; i < jd; i++) {
// if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 1) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-shopping-cart bg-danger"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">baru</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 2) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-shopping-cart bg-danger"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message" style="color:red">revisi</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 3) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-print bg-danger"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">Selesai diprint</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 5) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-question bg-primary"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">Diterima</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 6) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-copy bg-primary"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">Diterima</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 7) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-paper-plane bg-success"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > Jadwal Visit <b style="color:Teal">' + response.dataNotif[i]['TANGGAL'] + '</b> </span>';
// datnot += '<span class="message"> ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>'
// datnot += '</a>';
// datnot += '</li>';
// }
//
// }
// $('#nt').html(datnot);
// }
// }
// });
//
// setInterval(function() {
// $.ajax({
// url: "<?= base_url() ?>index.php/ManageNotifikasi/notif",
// type: "POST",
// dataType: "json",
// data: {
// jabatan: '<?= $this->session->userdata("jabatan") ?>',
// id_karyawan: <?= $this->session->userdata("id_karyawan") ?>
// },
// success: function(response) {
// if (response.value == 1) {
// var datnot = '';
// $('#nt').remove();
// datnot += '<ul id="nt">';
// datnot += '</ul>';
// $('#notif').html(datnot);
// console.log(response)
//
// $("#totalnotif").text(response.dataNotif.length);
// $("#totalnotif2").text(response.dataNotif.length);
// var jd = 5;
// if (response.dataNotif.length < 5) {
// jd = response.dataNotif.length
// } else {
// jd = 5;
// }
//
// for (var i = 0; i < jd; i++) {
// if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 1) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-shopping-cart bg-danger"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">baru</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 2) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-shopping-cart bg-danger"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message" style="color:red">revisi</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 3) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-print bg-danger"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">Selesai diprint</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 5) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-question bg-primary"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">Diterima</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 6) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-copy bg-primary"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>';
// datnot += '<span class="message">Diterima</span>'
// datnot += '</a>';
// datnot += '</li>';
// } else if (response.dataNotif[i]['JENIS_NOTIFIKASI'] == 7) {
// datnot += '<li>';
// datnot += '<a href="<?= base_url() ?>index.php/ManageNotifikasi/baca_notif?id_log_notifikasi=' + response.dataNotif[i]['ID_LOG_NOTIFIKASI'] + '" class="clearfix">';
// datnot += '<div class="image">';
// datnot += '<i class = "fa fa-paper-plane bg-success"></i>';
// datnot += '</div> ';
// datnot += '<span class = "title" > Jadwal Visit <b style="color:Teal">' + response.dataNotif[i]['TANGGAL'] + '</b> </span>';
// datnot += '<span class="message"> ' + response.dataNotif[i]['KET_NOTIFIKASI'] + ' </span>'
// datnot += '</a>';
// datnot += '</li>';
// }
//
// }
// $('#nt').html(datnot);
// }
// }
// });
// }, 5000)
//
//}
</script>