fix : request sdm notif and filtering data
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
<link href="assets/css/menu.css" rel="stylesheet" type="text/css" />
|
||||
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="../plugins/switchery/switchery.min.css">
|
||||
<link rel="stylesheet" href="plugins/select2/css/select2.min.css">
|
||||
|
||||
<!-- DataTables -->
|
||||
<link href="plugins/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -575,7 +576,10 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
?>
|
||||
<li class="menu-title">PELATIHAN</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="pel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="pel_inbox">
|
||||
<i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_pelatihan" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="pel_laporan"><i class="mdi mdi-table"></i> <span>Laporan </span> </a>
|
||||
@@ -586,7 +590,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
<li class="menu-title">SPONSORSHIP</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="spo_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="spo_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_sponsorship" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="spo_laporan"><i class="mdi mdi-table"></i> <span>Laporan </span> </a>
|
||||
@@ -597,7 +603,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
<li class="menu-title">FELLOWSHIP</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="ship_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="ship_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_fellowship" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="spo_laporan"><i class="mdi mdi-table"></i> <span>Laporan </span> </a>
|
||||
@@ -608,7 +616,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
<li class="menu-title">IJIN BELAJAR</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="bel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="bel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_ijin_belajar" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub hiddik">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="bel_setting"><i class="mdi mdi-settings"></i> <span>Setting </span> </a>
|
||||
@@ -616,7 +626,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
<li class="menu-title">TUGAS BELAJAR</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="tbel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="tbel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_tugas_belajar" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub hiddik">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="tbel_setting"><i class="mdi mdi-settings"></i> <span>Setting </span> </a>
|
||||
@@ -624,7 +636,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
<li class="menu-title">KETERANGAN IJIN BELAJAR</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="kbel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="kbel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_keterangan_ijin_belajar" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub hiddik">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="kbel_setting"><i class="mdi mdi-settings"></i> <span>Setting </span> </a>
|
||||
@@ -632,7 +646,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
<li class="menu-title">PENCANTUMAN GELAR</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="jbel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="jbel_inbox"><i class="mdi mdi-inbox"></i><span> Inbox</span>
|
||||
<span class="label label-danger pull-right" id="notif_pencantuman_gelar" style="display: inline;">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub hiddik">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="jbel_setting"><i class="mdi mdi-settings"></i> <span>Setting </span> </a>
|
||||
@@ -674,26 +690,40 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
</li>
|
||||
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_pel"><i class="mdi mdi-check-circle-outline"></i> <span>Pelatihan </span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_pel"><i class="mdi mdi-check-circle-outline"></i> <span>Pelatihan </span>
|
||||
<span class="label label-danger pull-right" id="notif_pel" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_spo"><i class="mdi mdi-lightbulb-outline"></i> <span>Sponsorship</span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_spo"><i class="mdi mdi-lightbulb-outline"></i> <span>Sponsorship</span>
|
||||
<span class="label label-danger pull-right" id="notif_spo" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_ship"><i class="mdi mdi-google-circles-group"></i> <span>Fellowship </span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_ship"><i class="mdi mdi-google-circles-group"></i> <span>Fellowship </span>
|
||||
<span class="label label-danger pull-right" id="notif_ship" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_ibel"><i class="mdi mdi-library"></i> <span>Ijin Belajar </span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_ibel"><i class="mdi mdi-library"></i> <span>Ijin Belajar </span>
|
||||
<span class="label label-danger pull-right" id="notif_ibel" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_tbel"><i class="mdi mdi-cast"></i> <span>Tugas Belajar </span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_tbel"><i class="mdi mdi-cast"></i> <span>Tugas Belajar </span>
|
||||
<span class="label label-danger pull-right" id="notif_tbel" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_kbel"><i class="mdi mdi-school"></i> <span>Keterangan Belajar </span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_kbel"><i class="mdi mdi-school"></i> <span>Keterangan Belajar </span>
|
||||
<span class="label label-danger pull-right" id="notif_kbel" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_jbel"><i class="mdi mdi-file-outline"></i> <span>Usulan Gelar </span> </a>
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_jbel"><i class="mdi mdi-file-outline"></i> <span>Usulan Gelar </span>
|
||||
<span class="label label-danger pull-right" id="notif_jbel" style="display: inline;">0</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li class="has_sub">
|
||||
<a href="#" class="waves-effect" style="color:#707071" id="st_tubel"><i class="mdi mdi-lightbulb-outline"></i> <span>Riwayat Pelatihan </span> </a>
|
||||
@@ -848,7 +878,7 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
<script src="plugins/highcharts/jquery.highchartTable.js"></script>
|
||||
<script src="plugins/highcharts/exporting.js"></script>
|
||||
|
||||
<script src="assets/js/select2.js"></script>
|
||||
<script src="plugins/select2/js/select2.min.js"></script>
|
||||
<script src="assets/js/enter.js"></script>
|
||||
<script src="assets/js/jspdf.min.js"></script>
|
||||
|
||||
@@ -856,6 +886,66 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
|
||||
var sess_satker = $('#cek_satker').val();
|
||||
var sess_jenis = $('#cek_jenis').val();
|
||||
|
||||
function setNotifBadge(selector, value) {
|
||||
var count = parseInt(value, 10);
|
||||
if (isNaN(count) || count < 0) {
|
||||
count = 0;
|
||||
}
|
||||
var $badge = $(selector);
|
||||
if (!$badge.length) {
|
||||
return;
|
||||
}
|
||||
$badge.text(count);
|
||||
if (count > 0) {
|
||||
$badge.show();
|
||||
} else {
|
||||
$badge.hide();
|
||||
}
|
||||
}
|
||||
function loadCountNotif() {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'count_notif_admin.php',
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
success: function(res) {
|
||||
setNotifBadge('#notif_pelatihan', res.count_pelatihan);
|
||||
setNotifBadge('#notif_sponsorship', res.count_spo);
|
||||
setNotifBadge('#notif_fellowship', res.count_fellowship);
|
||||
setNotifBadge('#notif_ijin_belajar', res.count_ijin_belajar);
|
||||
setNotifBadge('#notif_tugas_belajar', res.count_tugas_belajar);
|
||||
setNotifBadge('#notif_keterangan_ijin_belajar', res.count_ket_ijin_belajar);
|
||||
setNotifBadge('#notif_pencantuman_gelar', res.count_pencantuman_gelar);
|
||||
}
|
||||
});
|
||||
}
|
||||
function loadCountNotifStaff() {
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'count_revisi_staff.php',
|
||||
data: {data_pegawai_id: data_pegawai_id},
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
success: function(res) {
|
||||
setNotifBadge('#notif_pel', res.count_pelatihan);
|
||||
setNotifBadge('#notif_spo', res.count_spo);
|
||||
setNotifBadge('#notif_ship', res.count_fellowship);
|
||||
setNotifBadge('#notif_ibel', res.count_ijin_belajar);
|
||||
setNotifBadge('#notif_tbel', res.count_tugas_belajar);
|
||||
setNotifBadge('#notif_kbel', res.count_ket_ijin_belajar);
|
||||
setNotifBadge('#notif_jbel', res.count_pencantuman_gelar);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var cek_jenis = $('#cek_jenis').val();
|
||||
if(cek_jenis=='Staf') {
|
||||
loadCountNotifStaff();
|
||||
} else {
|
||||
loadCountNotif();
|
||||
}
|
||||
|
||||
if (sess_jenis=='Kordik') {$('.hiddik').hide();} else {$('.hiddik').show();}
|
||||
|
||||
@@ -913,105 +1003,129 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1db00', end
|
||||
});
|
||||
|
||||
$('#st_spo').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_spo/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_pel').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_pel/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_sp').click(function(){
|
||||
loadCountNotif();
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_sp/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_ibel').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_ibel/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_tbel').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_tbel/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_kbel').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_kbel/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_jbel').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_jbel/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#bel_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/bel_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#bel_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/bel_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#tbel_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/tbel_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#tbel_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/tbel_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#kbel_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/kbel_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#kbel_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/kbel_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#jbel_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/jbel_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#jbel_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/jbel_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#pel_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/pel_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#pel_laporan').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/pel_laporan/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#pel_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/pel_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#spo_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/spo_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#spo_laporan').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/spo_laporan/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#spo_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/spo_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#ship_inbox').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/ship_inbox/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#ship_setting').click(function(){
|
||||
loadCountNotif();
|
||||
$.post('app/ship_setting/main.php',{jenis:sess_jenis, satker:sess_satker},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
$('#st_ship').click(function(){
|
||||
loadCountNotifStaff(); //notif_sdm
|
||||
var data_pegawai_id=$('#cek_data_pegawai_id').val();
|
||||
$.post('app/st_ship/main.php',{data_pegawai_id:data_pegawai_id},function(html){$("#main_tag").html(html)});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user