Compare commits
2
Commits
55f1ebfcc6
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da867fa657 | ||
|
|
817a3c5034 |
@@ -29,4 +29,16 @@ if ($key=='delete_jbel_setting') {
|
||||
if(file_exists($path)){unlink($path);}
|
||||
$del_jbel_setting = pg_query("DELETE FROM syarat_jbel WHERE id='$id'");
|
||||
}
|
||||
else if ($key=='ch_asn') {
|
||||
$id=$_POST['id'];
|
||||
$d=pg_query("SELECT asn FROM syarat_jbel WHERE id='$id'");
|
||||
while($r=pg_fetch_array($d)) {$asn=$r[0];}
|
||||
if ($asn==NULL) {pg_query("UPDATE syarat_jbel SET asn='y' WHERE id=$id");} else {pg_query("UPDATE syarat_jbel SET asn=NULL WHERE id=$id");}
|
||||
}
|
||||
else if ($key=='ch_pppk') {
|
||||
$id=$_POST['id'];
|
||||
$d=pg_query("SELECT pppk FROM syarat_jbel WHERE id='$id'");
|
||||
while($r=pg_fetch_array($d)) {$pppk=$r[0];}
|
||||
if ($pppk==NULL) {pg_query("UPDATE syarat_jbel SET pppk='y' WHERE id=$id");} else {pg_query("UPDATE syarat_jbel SET pppk=NULL WHERE id=$id");}
|
||||
}
|
||||
?>
|
||||
@@ -13,6 +13,8 @@ style="font-family:'RubReg';font-size:13px"
|
||||
<tr style="text-align:center;color:black;font-weight:bold">
|
||||
<td width="30">No</td>
|
||||
<td>Berkas</td>
|
||||
<td width="100px;">PNS</td>
|
||||
<td width="100px;">PPPK</td>
|
||||
<td width="10px;">#</td>
|
||||
<td align="center" width="70px;">Tools</td>
|
||||
</tr>
|
||||
@@ -20,12 +22,14 @@ style="font-family:'RubReg';font-size:13px"
|
||||
<tbody style="color:black">
|
||||
<?php
|
||||
$no=1;
|
||||
$data = pg_query("SELECT id,berkas FROM syarat_jbel ORDER BY id ASC");
|
||||
$data = pg_query("SELECT id,berkas,asn,pppk FROM syarat_jbel ORDER BY id ASC");
|
||||
while($row=pg_fetch_array($data)) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="kiri" align="center"><?php echo $no; ?></td>
|
||||
<td><?php echo $row['berkas']; ?></td>
|
||||
<td align="center" style="color:red" class="ch_asn" id="<?php echo $row['id'];?>"><?php if ($row['asn']=='y') { ?><i class="fa fa-check"></i><?php } else {} ?></td>
|
||||
<td align="center" style="color:red" class="ch_pppk" id="<?php echo $row['id'];?>"><?php if ($row['pppk']=='y') { ?><i class="fa fa-check"></i><?php } else {} ?></td>
|
||||
<td align="center">
|
||||
<button type="button" name="file_contoh" style="height:22px;"class="btn btn-default btn-xs file_contoh"
|
||||
id="<?php echo $row['id'];?>" data-content="Upload Contoh Dokumen"
|
||||
@@ -107,5 +111,35 @@ $("#tabel_data_jbel_setting").on('click','.file_contoh',function(){
|
||||
} else {}
|
||||
});
|
||||
|
||||
$("#tabel_data_jbel_setting").on('click','.ch_asn',function(){
|
||||
var key = "ch_asn";
|
||||
var syarat_jbel_id = $(this).attr('id');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/jbel_setting/crud.php",
|
||||
data: 'id='+syarat_jbel_id
|
||||
+'&key='+key,
|
||||
success: function(data){
|
||||
$('#tabel_jbel_setting').load("app/jbel_setting/tabel.php");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#tabel_data_jbel_setting").on('click','.ch_pppk',function(){
|
||||
var key = "ch_pppk";
|
||||
var syarat_jbel_id = $(this).attr('id');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/jbel_setting/crud.php",
|
||||
data: 'id='+syarat_jbel_id
|
||||
+'&key='+key,
|
||||
success: function(data){
|
||||
$('#tabel_jbel_setting').load("app/jbel_setting/tabel.php");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
+1
-3
@@ -1,13 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$conn = pg_connect("host=localhost port=5432 dbname=simpro2 user='root'
|
||||
password='rumbuk'");
|
||||
|
||||
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $con->connect_error);
|
||||
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -85,6 +85,14 @@ if ($key=='delete_user') {
|
||||
$id=$_POST['id'];
|
||||
$del_user = pg_query("DELETE FROM data_user WHERE id='$id'");
|
||||
} else
|
||||
if ($key=='nonaktif_user') {
|
||||
$id=$_POST['id'];
|
||||
$upd_user = pg_query("UPDATE data_user SET aktif='f' WHERE id='$id'");
|
||||
} else
|
||||
if ($key=='aktif_user') {
|
||||
$id=$_POST['id'];
|
||||
$upd_user = pg_query("UPDATE data_user SET aktif='t' WHERE id='$id'");
|
||||
} else
|
||||
if ($key=='ganti_password') {
|
||||
$nampeg=$_POST['nampeg'];
|
||||
$d=pg_query("SELECT id FROM data_pegawai WHERE nama='$nampeg'");
|
||||
|
||||
@@ -59,7 +59,7 @@ var sess_satker = $('#cek_satker').val();
|
||||
var imp3 = $("#user_nama").val();
|
||||
var z3 = $('#browsers');
|
||||
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
||||
var data_pegawai_id = val3.attr('id_ms_pegawai2');
|
||||
var data_pegawai_id = $("#user_nama").val();
|
||||
var jenis = $('#jenis_user').val();
|
||||
var aktif = $('#user_aktif').val();
|
||||
var username = $('#username').val();
|
||||
|
||||
+46
-24
@@ -21,6 +21,12 @@ while($row=pg_fetch_array($data)) {
|
||||
$satuan_kerja_id=$row[7];
|
||||
$nama=$row[8];
|
||||
}
|
||||
|
||||
//default aktif user
|
||||
if(!$id){
|
||||
$aktif = "t";
|
||||
$jenis_user = 5;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -30,32 +36,23 @@ while($row=pg_fetch_array($data)) {
|
||||
|
||||
|
||||
|
||||
<input type="text" class="form-control" list="browsers" name="browser" id="user_nama" value="<?php echo $nama; ?>">
|
||||
<datalist id="browsers">
|
||||
<select class="form-control js-select2-single" id="user_nama" name="user_nama" style="width: 100%;">
|
||||
<option></option>
|
||||
<?php
|
||||
$userpeg=pg_query("SELECT p.nama,p.id,s.nama
|
||||
$userpeg=pg_query("SELECT p.id, p.nama, s.nama as satker_nama, s.id as satker_id
|
||||
FROM data_pegawai p
|
||||
INNER JOIN satuan_kerja s ON (s.id=p.satuan_kerja)
|
||||
WHERE p.aktif='t'
|
||||
".($jenis== 'Kordik' ? "AND s.id=$satker_id" : "")."
|
||||
ORDER BY p.nama ASC");
|
||||
while($rows=pg_fetch_array($userpeg)) {
|
||||
while($rows=pg_fetch_array($userpeg)) {
|
||||
$selected = ($nama == $rows['nama']) ? 'selected' : '';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false) {
|
||||
?>
|
||||
<option id_ms_pegawai2="<?php echo($rows['id']);?>" value="<?php echo $rows[0]; ?>"><?php echo $rows[2]; ?></option>
|
||||
<?php
|
||||
} else
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
|
||||
?>
|
||||
<option id_ms_pegawai2="<?php echo($rows['id']);?>" value="<?php echo $rows[0]; ?>"><?php echo $rows[0].' ------ '.$rows[2]; ?></option>
|
||||
<option value="<?php echo $rows['id']; ?>" data-satker-id="<?php echo $rows['satker_id']; ?>" <?php echo $selected; ?>><?php echo $rows['nama']; ?> - <?php echo $rows['satker_nama']; ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</datalist>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
@@ -95,10 +92,9 @@ while($row=pg_fetch_array($data)) {
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Jenis</label>
|
||||
<select class="form-control" name="jenis_user" id="jenis_user">
|
||||
<option></option>
|
||||
<?php
|
||||
$ju=pg_query("SELECT id,jenis FROM jenis_user WHERE id IS NOT NULL
|
||||
".($jenis== 'Kordik' ? "AND jenis='Staf'" : "")."
|
||||
AND (jenis = 'Admin' OR jenis = 'Staf')
|
||||
ORDER BY id ASC");
|
||||
while($rju=pg_fetch_array($ju)) {
|
||||
?>
|
||||
@@ -110,18 +106,44 @@ while($row=pg_fetch_array($data)) {
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Aktif</label>
|
||||
<select class="form-control" id="user_aktif">
|
||||
<option></option>
|
||||
<option <?php if ($aktif=='t') {echo "selected";} ?> value="1">AKTIF</option>
|
||||
<option <?php if ($aktif=='f') {echo "selected";} ?> value="0">OFF</option>
|
||||
</select>
|
||||
<input type="hidden" id="user_aktif" name="user_aktif" value="<?= $aktif == 't' ? '1' : '0' ?>">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var $userNama = $('#user_nama');
|
||||
var $dropdownParent = $userNama.closest('.modal');
|
||||
|
||||
$userNama.select2({
|
||||
placeholder: 'Pilih Pegawai',
|
||||
allowClear: true,
|
||||
width: '100%',
|
||||
dropdownParent: $dropdownParent.length ? $dropdownParent : $(document.body)
|
||||
});
|
||||
|
||||
function setSatkerFromSelectedPegawai() {
|
||||
var selected = $('#user_nama option:selected');
|
||||
var satkerId = selected.data('satker-id');
|
||||
|
||||
if (!satkerId) {
|
||||
$('#user_satker').val('');
|
||||
} else {
|
||||
$('#user_satker').val(String(satkerId));
|
||||
}
|
||||
|
||||
// Refresh UI if #user_satker is enhanced (select2/other)
|
||||
$('#user_satker').trigger('change');
|
||||
|
||||
|
||||
$('#jenis_user').val('5').trigger('change');
|
||||
}
|
||||
|
||||
// When select2 changes (select, clear)
|
||||
$userNama.on('change', setSatkerFromSelectedPegawai);
|
||||
|
||||
/* $("#user_nama").change(function(){
|
||||
var id_ms_pegawai3 = $("#user_nama").val();
|
||||
var z = $('#browsers');
|
||||
|
||||
+102
-4
@@ -1,13 +1,46 @@
|
||||
<?php
|
||||
include('../../koneksi.php');
|
||||
$jenis=$_POST['jenis'];
|
||||
$satker_id=$_POST['satker_id'];
|
||||
$satker_id=(int)$_POST['satker_id'];
|
||||
|
||||
// Filter aktif user: default ON (t)
|
||||
$aktif_filter = isset($_POST['aktif']) ? $_POST['aktif'] : 't';
|
||||
$aktif_filter = ($aktif_filter === 'f') ? 'f' : 't';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('button[name="edit_user"]').popover();
|
||||
$('button[name="nonaktif_user"]').popover();
|
||||
$('button[name="aktif_user"]').popover();
|
||||
$('button[name="delete_user"]').popover();
|
||||
$("#tabel_data_user").DataTable({"stateSave": true,"paging": true,"lengthChange": true,"searching": true,"ordering": false,"info": true,"autoWidth": false});
|
||||
var dtUser = $("#tabel_data_user").DataTable({
|
||||
"stateSave": true,
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": false,
|
||||
"info": true,
|
||||
"autoWidth": false,
|
||||
"destroy": true
|
||||
});
|
||||
// Inject filter aktif into DataTables controls
|
||||
(function(){
|
||||
var aktifFilter = <?php echo json_encode($aktif_filter); ?>;
|
||||
var $wrapper = $('#tabel_data_user_wrapper');
|
||||
var $target = $wrapper.find('.dataTables_filter');
|
||||
if ($target.length && !$target.find('#filter_aktif_user').length) {
|
||||
$target.append(
|
||||
'<span style="margin-left:20px;">' +
|
||||
'<label style="margin:0 6px 0 0;">Aktif:</label>' +
|
||||
'<select id="filter_aktif_user" class="form-control input-sm" style="width: 140px; display:inline-block;">' +
|
||||
'<option value="t">ON</option>' +
|
||||
'<option value="f">OFF</option>' +
|
||||
'</select>' +
|
||||
'</span>'
|
||||
);
|
||||
}
|
||||
$('#filter_aktif_user').val(aktifFilter);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<table id="tabel_data_user" class="table table-striped table-condensed table-bordered" cellpadding="1" style="font-family:Arial;font-size:13px">
|
||||
@@ -26,13 +59,21 @@ $("#tabel_data_user").DataTable({"stateSave": true,"paging": true,"lengthChange"
|
||||
<tbody style="color:black">
|
||||
<?php
|
||||
$no=1;
|
||||
|
||||
$where = array();
|
||||
$where[] = "u.aktif='$aktif_filter'";
|
||||
if ($jenis == 'Kordik') {
|
||||
$where[] = "s2.id=$satker_id";
|
||||
}
|
||||
$whereSql = (count($where) ? ('WHERE '.implode(' AND ', $where)) : '');
|
||||
|
||||
$data = pg_query("SELECT u.id,s.nama,u.nama,u.password,j.jenis,u.aktif,p.nama,COALESCE(s2.nama,s.nama)
|
||||
FROM data_user u
|
||||
LEFT OUTER JOIN satuan_kerja s ON (u.satuan_kerja_id=s.id)
|
||||
INNER JOIN jenis_user j ON (j.id=u.jenis_user)
|
||||
LEFT OUTER JOIN data_pegawai p ON (p.id=u.data_pegawai_id)
|
||||
LEFT OUTER JOIN satuan_kerja s2 ON (s2.id=p.satuan_kerja)
|
||||
".($jenis== 'Kordik' ? "WHERE s2.id=$satker_id" : "")."
|
||||
".$whereSql."
|
||||
ORDER BY u.id DESC");
|
||||
while($row=pg_fetch_array($data)) {
|
||||
$jns=$row[4];
|
||||
@@ -55,6 +96,15 @@ $("#tabel_data_user").DataTable({"stateSave": true,"paging": true,"lengthChange"
|
||||
<i class="fa fa-remove"></i>
|
||||
</button>
|
||||
<?php } else {} ?>
|
||||
<?php if ($row[5]=='t') { ?>
|
||||
<button type="button" name="nonaktif_user" style="height:22px;"class="btn btn-danger btn-xs nonaktif_user" id="<?php echo $row['id'];?>" data-content="Nonaktifkan" rel="popover" data-placement="top" data-trigger="hover">
|
||||
<i class="fa fa-remove"></i>
|
||||
</button>
|
||||
<?php } else { ?>
|
||||
<button type="button" name="aktif_user" style="height:22px;"class="btn btn-success btn-xs aktif_user" id="<?php echo $row['id'];?>" data-content="Aktifkan" rel="popover" data-placement="top" data-trigger="hover">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -67,6 +117,13 @@ $("#tabel_data_user").DataTable({"stateSave": true,"paging": true,"lengthChange"
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// Handle filter change (re-load table)
|
||||
$(document).off('change', '#filter_aktif_user').on('change', '#filter_aktif_user', function(){
|
||||
var sess_jenis = $('#cek_jenis').val();
|
||||
var sess_satker = $('#cek_satker').val();
|
||||
var sess_aktif = $('#filter_aktif_user').val();
|
||||
$('#tabel_user').load("app/master/user/tabel.php",{jenis:sess_jenis,satker_id:sess_satker,aktif:sess_aktif});
|
||||
});
|
||||
$("#tabel_data_user").on('click','.edit_user',function(){
|
||||
var id = $(this).attr('id');
|
||||
var sess_jenis = $('#cek_jenis').val();
|
||||
@@ -100,11 +157,52 @@ $("#tabel_data_user").DataTable({"stateSave": true,"paging": true,"lengthChange"
|
||||
success: function(data){
|
||||
var sess_jenis = $('#cek_jenis').val();
|
||||
var sess_satker = $('#cek_satker').val();
|
||||
$('#tabel_user').load("app/master/user/tabel.php",{jenis:sess_jenis,satker_id:sess_satker});
|
||||
var sess_aktif = $('#filter_aktif_user').val();
|
||||
$('#tabel_user').load("app/master/user/tabel.php",{jenis:sess_jenis,satker_id:sess_satker,aktif:sess_aktif});
|
||||
}
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
|
||||
$("#tabel_data_user").on('click','.nonaktif_user',function(){
|
||||
var x = confirm("Anda yakin ingin menonaktifkan ?");
|
||||
if (x) {
|
||||
var key = "nonaktif_user";
|
||||
var id = $(this).attr('id');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/master/user/crud.php",
|
||||
data: 'id='+id
|
||||
+'&key='+key,
|
||||
success: function(data){
|
||||
var sess_jenis = $('#cek_jenis').val();
|
||||
var sess_satker = $('#cek_satker').val();
|
||||
var sess_aktif = $('#filter_aktif_user').val();
|
||||
$('#tabel_user').load("app/master/user/tabel.php",{jenis:sess_jenis,satker_id:sess_satker,aktif:sess_aktif});
|
||||
}
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
|
||||
$("#tabel_data_user").on('click','.aktif_user',function(){
|
||||
var x = confirm("Anda yakin ingin mengaktifkan ?");
|
||||
if (x) {
|
||||
var key = "aktif_user";
|
||||
var id = $(this).attr('id');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/master/user/crud.php",
|
||||
data: 'id='+id
|
||||
+'&key='+key,
|
||||
success: function(data){
|
||||
var sess_jenis = $('#cek_jenis').val();
|
||||
var sess_satker = $('#cek_satker').val();
|
||||
var sess_aktif = $('#filter_aktif_user').val();
|
||||
$('#tabel_user').load("app/master/user/tabel.php",{jenis:sess_jenis,satker_id:sess_satker,aktif:sess_aktif});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -103,11 +103,11 @@ if ($tujuan_spo=='ln') {$tspo='LUAR NEGERI';}
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" style="color:black">Laporan Sponsorship</label>
|
||||
<label for="exampleInputEmail1" style="color:black">Surat Izin BKD</label>
|
||||
<form id="fr_bkd" name="fr_bkd" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||
<input type="hidden" value="<?php echo $riwayat_spo_id; ?>" name="riwayat_spo_id_uploadx">
|
||||
<div class="btn-group btn-group-justified singit">
|
||||
<a class="btn btn-default waves-effect waves-light btn-block" role="button" id="btn_load_bkd"><i class="fa fa-folder-open"></i> Load File Laporan Sponsorship</a>
|
||||
<a class="btn btn-default waves-effect waves-light btn-block" role="button" id="btn_load_bkd"><i class="fa fa-folder-open"></i> Load File Surat Izin BKD</a>
|
||||
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_bkd"><i class="fa fa-upload"></i> Upload</a>
|
||||
</div>
|
||||
<input type="file" name="input_load_bkd" class="filestyle" style="display:none" data-buttonbefore="true" id="input_load_bkd">
|
||||
|
||||
+34
-3
@@ -11,6 +11,7 @@
|
||||
</style>
|
||||
<?php
|
||||
include('../koneksi.php');
|
||||
$filter = isset($_POST['filter'])?$_POST['filter']:'';
|
||||
|
||||
$data_pegawai_id=$_POST['data_pegawai_id'];
|
||||
$d=pg_query("SELECT p.nama,p.nipb,p.golongan,p.ruang,s.nama
|
||||
@@ -148,12 +149,19 @@ Riwayat
|
||||
</div>
|
||||
|
||||
<div class="row" style="color:black" id="tes2">
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-4">
|
||||
<span style="font-family:Arial;font-weight:bold">
|
||||
Daftar Kelengkapan dan Persyaratan
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<select id="filter_pns_pppk" class="form-control" style="width:220px;display:inline-block">
|
||||
<option value=""<?php if($filter=='') echo ' selected';?>>- Pilih Filter -</option>
|
||||
<option value="pns"<?php if($filter=='pns') echo ' selected';?>>PNS</option>
|
||||
<option value="pppk"<?php if($filter=='pppk') echo ' selected';?>>PPPK</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button class="btn btn-default btn-block" id="btn_tgg2" style="font-family:Arial;font-weight:bold"><i class="mdi mdi-timer-sand m-r-5"></i>
|
||||
Tunggu
|
||||
<span class="label label-purple pull-right" style="margin-top:2px" id="jtggbg_notif2"></span>
|
||||
@@ -338,7 +346,12 @@ $('#tes2').show();
|
||||
$('.bat').show();
|
||||
var riwayat_jbel_id=$('#riwayat_jbel_id').val();
|
||||
var data_pegawai_id=$('#data_pegawai_id').val();
|
||||
$('#tabel_kelengkapan').load('app/st_jbel/tabel_daftar.php',{riwayat_jbel_id:riwayat_jbel_id, data_pegawai_id:data_pegawai_id});
|
||||
var filter_val = $('#filter_pns_pppk').val() || '';
|
||||
if (filter_val=='') {
|
||||
$('#tabel_kelengkapan').hide();
|
||||
} else {
|
||||
$('#tabel_kelengkapan').show().load('app/st_jbel/tabel_daftar.php',{riwayat_jbel_id:riwayat_jbel_id, data_pegawai_id:data_pegawai_id, filter: filter_val});
|
||||
}
|
||||
}
|
||||
|
||||
$('#batal_registrasi').click(function(){
|
||||
@@ -463,7 +476,12 @@ $.ajax({
|
||||
$('#jumlah_jbel').val('1');
|
||||
var riwayat_jbel_id=$('#riwayat_jbel_id').val();
|
||||
var data_pegawai_id=$('#data_pegawai_id').val();
|
||||
$('#tabel_kelengkapan').load('app/st_jbel/tabel_daftar.php',{riwayat_jbel_id:riwayat_jbel_id, data_pegawai_id:data_pegawai_id});
|
||||
var filter_now = $('#filter_pns_pppk').val() || '';
|
||||
if (filter_now=='') {
|
||||
$('#tabel_kelengkapan').empty().hide();
|
||||
} else {
|
||||
$('#tabel_kelengkapan').show().load('app/st_jbel/tabel_daftar.php',{riwayat_jbel_id:riwayat_jbel_id, data_pegawai_id:data_pegawai_id, filter: filter_now});
|
||||
}
|
||||
$('#tes1').hide();
|
||||
$('#tes2').show();
|
||||
$('.bat').show();
|
||||
@@ -544,4 +562,17 @@ $(document).on('hidden.bs.modal', function (event) {
|
||||
$('body').addClass('modal-open');
|
||||
}
|
||||
});
|
||||
|
||||
// reload kelengkapan table when filter changes
|
||||
$(document).on('change','#filter_pns_pppk',function(){
|
||||
if ($('#jumlah_jbel').val()=='0') return;
|
||||
var riwayat_jbel_id = $('#riwayat_jbel_id').val();
|
||||
var data_pegawai_id = $('#data_pegawai_id').val();
|
||||
var filter = $(this).val() || '';
|
||||
if (filter=='') {
|
||||
$('#tabel_kelengkapan').empty().hide();
|
||||
} else {
|
||||
$('#tabel_kelengkapan').show().load('app/st_jbel/tabel_daftar.php',{riwayat_jbel_id:riwayat_jbel_id, data_pegawai_id:data_pegawai_id, filter: filter});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
include("../koneksi.php");
|
||||
$riwayat_jbel_id=$_POST['riwayat_jbel_id'];
|
||||
$data_pegawai_id=$_POST['data_pegawai_id'];
|
||||
$filter = isset($_POST['filter'])?$_POST['filter']:'';
|
||||
?>
|
||||
<br>
|
||||
<table class="table table-bordered table-condensed" id="tabel_data_daftar_us" style="font-family:'RubReg';font-size:13px">
|
||||
@@ -32,7 +33,12 @@ WHERE s.id IS NOT NULL
|
||||
ORDER BY s.id ASC
|
||||
");
|
||||
*/
|
||||
|
||||
$where_sql = '';
|
||||
if ($filter=='pns') {
|
||||
$where_sql = "WHERE s.asn='y'";
|
||||
} else if ($filter=='pppk') {
|
||||
$where_sql = "WHERE s.pppk='y'";
|
||||
}
|
||||
$d=pg_query("SELECT s.id,s.berkas,b.st_ceklist,b.status,a.id,COALESCE(b.id,0),b.ket,a.data_pegawai_id,b.tgl_upload_dok,b.tgl_cek_dok
|
||||
FROM syarat_jbel s
|
||||
LEFT OUTER JOIN (
|
||||
@@ -47,7 +53,7 @@ FROM riwayat_jbel r1
|
||||
INNER JOIN riwayat_syarat_jbel r2 ON (r1.id=r2.riwayat_jbel_id)
|
||||
WHERE r1.id=$riwayat_jbel_id
|
||||
) b ON (s.id=b.syarat_jbel_id)
|
||||
");
|
||||
" . $where_sql . " ORDER BY s.id ASC");
|
||||
while($r=pg_fetch_array($d)) {
|
||||
$syarat_jbel_id=$r[0];
|
||||
$riwayat_jbel_id=$r[4];
|
||||
@@ -153,4 +159,20 @@ $("#tabel_data_daftar_us").on('click','.file_contoh',function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// reload table when filter changes
|
||||
$(document).on('change','#filter_pns_pppk',function(){
|
||||
var filter = $(this).val();
|
||||
var riwayat_jbel_id = $('#riwayat_jbel_id').val();
|
||||
var data_pegawai_id = $('#data_pegawai_id').val();
|
||||
if (filter=='') {
|
||||
$('#tabel_daftar_wrapper').hide();
|
||||
} else {
|
||||
$('#tabel_daftar_wrapper').show();
|
||||
}
|
||||
});
|
||||
var filter = $('#filter_pns_pppk').val() || '';
|
||||
if (filter=='') {
|
||||
$('#tabel_daftar_wrapper').hide();
|
||||
}
|
||||
</script>
|
||||
Binary file not shown.
@@ -85,11 +85,11 @@ if ($status=='SELESAI VERIFIKASI') {
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" style="color:black">Laporan Sponsorship</label>
|
||||
<label for="exampleInputEmail1" style="color:black">Surat Izin BKD</label>
|
||||
<form id="fr_bkd" name="fr_bkd" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||
<input type="hidden" value="<?php echo $riwayat_spo_id; ?>" name="riwayat_spo_id_uploadx">
|
||||
<div class="btn-group btn-group-justified singit">
|
||||
<a class="btn btn-default waves-effect waves-light btn-block" role="button" id="btn_load_bkd"><i class="fa fa-folder-open"></i> Load File Laporan Sponsorship</a>
|
||||
<a class="btn btn-default waves-effect waves-light btn-block" role="button" id="btn_load_bkd"><i class="fa fa-folder-open"></i> Load File Surat Izin BKD</a>
|
||||
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_bkd"><i class="fa fa-upload"></i> Upload</a>
|
||||
</div>
|
||||
<input type="file" name="input_load_bkd" class="filestyle" style="display:none" data-buttonbefore="true" id="input_load_bkd">
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
include("app/koneksi.php");
|
||||
|
||||
// Hitung jumlah pelatihan yang belum diverifikasi
|
||||
$query_count_pelatihan = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_pel i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_pelatihan = pg_fetch_assoc($query_count_pelatihan);
|
||||
$count_pelatihan = $row_pelatihan['total'];
|
||||
|
||||
// Hitung jumlah SPO yang belum diverifikasi
|
||||
$query_count_spo = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_spo i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_spo = pg_fetch_assoc($query_count_spo);
|
||||
$count_spo = $row_spo['total'];
|
||||
|
||||
// Hitung jumlah Fellowship yang belum diverifikasi
|
||||
$query_count_fellowship = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_ship i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_fellowship = pg_fetch_assoc($query_count_fellowship);
|
||||
$count_fellowship = $row_fellowship['total'];
|
||||
|
||||
// Hitung jumlah Ijin Belajar yang belum diverifikasi
|
||||
$query_count_ijin_belajar = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_ibel i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_ijin_belajar = pg_fetch_assoc($query_count_ijin_belajar);
|
||||
$count_ijin_belajar = $row_ijin_belajar['total'];
|
||||
|
||||
// Hitung jumlah Tugas Belajar yang belum diverifikasi
|
||||
$query_count_tugas_belajar = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_tbel i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_tugas_belajar = pg_fetch_assoc($query_count_tugas_belajar);
|
||||
$count_tugas_belajar = $row_tugas_belajar['total'];
|
||||
|
||||
// Hitung jumlah Keterangan Ijin Belajar yang belum diverifikasi
|
||||
$query_count_ket_ijin_belajar = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_kbel i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_ket_ijin_belajar = pg_fetch_assoc($query_count_ket_ijin_belajar);
|
||||
$count_ket_ijin_belajar = $row_ket_ijin_belajar['total'];
|
||||
|
||||
// Hitung jumlah Pencantuman Gelar yang belum diverifikasi
|
||||
$query_count_pencantuman_gelar = pg_query("
|
||||
SELECT COUNT(*) AS total
|
||||
FROM riwayat_jbel i
|
||||
WHERE i.id IS NOT NULL
|
||||
AND i.tgl_verifikasi IS NULL
|
||||
AND i.status IS NULL
|
||||
");
|
||||
|
||||
$row_pencantuman_gelar = pg_fetch_assoc($query_count_pencantuman_gelar);
|
||||
$count_pencantuman_gelar = $row_pencantuman_gelar['total'];
|
||||
|
||||
echo json_encode(array(
|
||||
'count_pelatihan' => $count_pelatihan,
|
||||
'count_spo' => $count_spo,
|
||||
'count_fellowship' => $count_fellowship,
|
||||
'count_ijin_belajar' => $count_ijin_belajar,
|
||||
'count_tugas_belajar' => $count_tugas_belajar,
|
||||
'count_ket_ijin_belajar' => $count_ket_ijin_belajar,
|
||||
'count_pencantuman_gelar' => $count_pencantuman_gelar
|
||||
));
|
||||
?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
include('app/koneksi.php');
|
||||
$data_pegawai_id=$_GET['data_pegawai_id'];
|
||||
|
||||
// Count revisions from all modules
|
||||
$data_pel = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_pel
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$data_spo = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_spo
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$data_ship = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_ship
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$data_ibel = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_ibel
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$data_tbel = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_tbel
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$data_kbel = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_kbel
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$data_jbel = pg_query("
|
||||
SELECT COUNT(*) as count
|
||||
FROM riwayat_jbel
|
||||
WHERE data_pegawai_id=$data_pegawai_id AND status = 'REVISI'
|
||||
");
|
||||
|
||||
$r_pel = pg_fetch_assoc($data_pel);
|
||||
$count_pel = $r_pel['count'];
|
||||
|
||||
$r_spo = pg_fetch_assoc($data_spo);
|
||||
$count_spo = $r_spo['count'];
|
||||
|
||||
$r_ship = pg_fetch_assoc($data_ship);
|
||||
$count_ship = $r_ship['count'];
|
||||
|
||||
$r_ibel = pg_fetch_assoc($data_ibel);
|
||||
$count_ibel = $r_ibel['count'];
|
||||
|
||||
$r_tbel = pg_fetch_assoc($data_tbel);
|
||||
$count_tbel = $r_tbel['count'];
|
||||
|
||||
$r_kbel = pg_fetch_assoc($data_kbel);
|
||||
$count_kbel = $r_kbel['count'];
|
||||
|
||||
$r_jbel = pg_fetch_assoc($data_jbel);
|
||||
$count_jbel = $r_jbel['count'];
|
||||
|
||||
|
||||
echo json_encode(array(
|
||||
'count_pelatihan' => $count_pel ? $count_pel : 0,
|
||||
'count_spo' => $count_spo ? $count_spo : 0,
|
||||
'count_fellowship' => $count_ship ? $count_ship : 0,
|
||||
'count_ijin_belajar' => $count_ibel ? $count_ibel : 0,
|
||||
'count_tugas_belajar' => $count_tbel ? $count_tbel : 0,
|
||||
'count_ket_ijin_belajar' => $count_kbel ? $count_kbel : 0,
|
||||
'count_pencantuman_gelar' => $count_jbel ? $count_jbel : 0
|
||||
));
|
||||
?>
|
||||
@@ -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