<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-90680653-2"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-90680653-2');
    </script>

    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Twitter -->
    <!-- <meta name="twitter:site" content="@bootstrapdash">
    <meta name="twitter:creator" content="@bootstrapdash">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="Azia">
    <meta name="twitter:description" content="Responsive Bootstrap 4 Dashboard Template">
    <meta name="twitter:image" content="https://www.bootstrapdash.com/azia/img/azia-social.png"> -->

    <!-- Facebook -->
    <!-- <meta property="og:url" content="https://www.bootstrapdash.com/azia">
    <meta property="og:title" content="Azia">
    <meta property="og:description" content="Responsive Bootstrap 4 Dashboard Template">

    <meta property="og:image" content="https://www.bootstrapdash.com/azia/img/azia-social.png">
    <meta property="og:image:secure_url" content="https://www.bootstrapdash.com/azia/img/azia-social.png">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="600"> -->

    <!-- Meta -->
    <meta name="description" content="Responsive Bootstrap 4 Dashboard Template">
    <meta name="author" content="BootstrapDash">

    <title>Sistem Informasi Pegawai | Yayasan Nurul Islam</title>
	<link rel="icon" type="image/png" href="<?php echo base_url();?>assets/images/favicon.png">

    <!-- vendor css -->
    <link href="<?php echo base_url();?>assets/pegawai/lib/fontawesome-free/css/all.min.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/pegawai/lib/ionicons/css/ionicons.min.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/pegawai/lib/typicons.font/typicons.css" rel="stylesheet">
    <link href="<?php echo base_url();?>assets/pegawai/lib/flag-icon-css/css/flag-icon.min.css" rel="stylesheet">

    <!-- azia CSS -->
    <link rel="stylesheet" href="<?php echo base_url();?>assets/pegawai/css/azia.css">

  </head>
  <body>

    <div class="az-header">
      <div class="container">
        <div class="az-header-left">
          <a href="<?php echo base_url();?>Pegawai" class="az-logo"><img src="<?php echo base_url();?>assets/images/logo.png" height="50px"></a>
          <a href="" id="azMenuShow" class="az-header-menu-icon d-lg-none"><span></span></a>
        </div><!-- az-header-left -->
        <div class="az-header-menu">
          <div class="az-header-menu-header">
            <a href="index.html" class="az-logo"><span></span> <img src="<?php echo base_url();?>assets/images/logo.png" style="max-height:40px;"></a>
            <a href="" class="close">&times;</a>
          </div><!-- az-header-menu-header -->
          <ul class="nav">
            <li class="nav-item">
              <a href="<?php echo base_url();?>Pegawai/personal" class="nav-link"><i class="typcn typcn-user"></i> Personal</a>
            </li>
            <li class="nav-item active show">
              <a href="<?php echo base_url();?>Pegawai/pegawai" class="nav-link"><i class="typcn typcn-contacts"></i> Kepegawaian</a>
            </li>
            <li class="nav-item">
              <a href="<?php echo base_url();?>Pegawai/keluarga" class="nav-link"><i class="typcn typcn-group"></i> Keluarga</a>
            </li>
            <li class="nav-item">
              <a href="<?php echo base_url();?>Pegawai/pendidikan" class="nav-link"><i class="typcn typcn-mortar-board"></i> Pendidikan</a>
            </li>
            <li class="nav-item">
              <a href="<?php echo base_url();?>Pegawai/kesehatan" class="nav-link"><i class="typcn typcn-heart"></i> Kesehatan</a>
            </li>
            <li class="nav-item">
              <a href="<?php echo base_url();?>Pegawai/downloadcv" class="nav-link"><i class="typcn typcn-download"></i> Download CV	</a>
            </li>
          </ul>
        </div><!-- az-header-menu -->
        <div class="az-header-right">
          <a href="<?php echo base_url();?>Pegawai/gantiPassword" class="az-header-search-link" title="Ganti Password"><i class="fas fa-cog"></i></a>
          <a href="<?php echo base_url();?>Login/logout" class="az-header-search-link" onclick="return confirm('Apakah Anda ingin logout?');" title="Logout"><i class="fas fa-power-off"></i></a>
        </div><!-- az-header-right -->
      </div><!-- container -->
    </div><!-- az-header -->

    <div class="az-content az-content-dashboard">
      <div class="container">
        <div class="az-content-body">
          <div class="az-content-label mg-b-5">Data Kepegawaian</div>
          <div class="row row-sm mg-b-20">
            <div class="col-lg-2">
              <p class="mg-b-10">Nama</p>
			</div>
            <div class="col-lg-10">
              <strong>
				<p>
					: <?php echo $pegawai->nama;?>
				</p>
              </strong>
            </div><!-- col-4 -->
          </div><!-- row -->
          <div class="row row-sm mg-b-20">
            <div class="col-lg-2">
              <p class="mg-b-10">NIP/NPP</p>
			</div>
            <div class="col-lg-10">
              <strong>
				<p>
					: 
					<?php
						if($pegawai->no_pegawai == NULL)
						{
							echo "-";
						}
						else
						{
							echo $pegawai->no_pegawai;
						}
					?>
				</p>
              </strong>
            </div><!-- col-4 -->
          </div><!-- row -->
          <div class="row row-sm mg-b-20">
            <div class="col-lg-2">
              <p class="mg-b-10">Unit Kerja</p>
			</div>
            <div class="col-lg-10">
              <strong>
				<p>
					: 
					<?php
						if($kepegawaian == NULL)
						{
							echo "-";
						}
						else
						{
							echo $kepegawaian->unit_kerja;
						}
					?>
				</p>
              </strong>
            </div><!-- col-4 -->
          </div><!-- row -->
          <div class="row row-sm mg-b-20">
            <div class="col-lg-2">
              <p class="mg-b-10">Status Kepegawaian</p>
			</div>
            <div class="col-lg-10">
              <strong>
				<p>
					: 
					<?php
						if($kepegawaian == NULL)
						{
							echo "-";
						}
						else
						{
							echo $kepegawaian->status_kepegawaian;
						}
					?>
				</p>
              </strong>
            </div><!-- col-4 -->
          </div><!-- row -->
          <div class="row row-sm mg-b-20">
            <div class="col-lg-2">
              <p class="mg-b-10">Tahun Masuk</p>
			</div>
            <div class="col-lg-10">
              <strong>
				<p>
					: 
					<?php
						if($kepegawaian == NULL)
						{
							echo "-";
						}
						else
						{
							echo $kepegawaian->tahun_masuk;
						}
					?>
				</p>
              </strong>
            </div><!-- col-4 -->
          </div><!-- row -->
          <div class="row row-sm mg-b-20">
            <div class="col-lg-2">
              <p class="mg-b-10">File SPK/SK</p>
			</div>
            <div class="col-lg-10">
              <strong>
				<p>
					: 
					<?php
						if($kepegawaian == NULL)
						{
							echo "-";
						}
						else
						{
							?>
								<a href="<?php echo base_url();?>assets/pegawai/docs/<?php echo $kepegawaian->foto_spksk;?>" download>Klik di sini untuk mendownload SPK/SK Anda!</a>
							<?php
						}
					?>
				</p>
              </strong>
            </div><!-- col-4 -->
          </div><!-- row -->
          <div class="row row-sm mg-b-20">
            <div class="col-lg-12">
              <a href="<?php echo base_url();?>Pegawai/pegawaiEdit" class="btn btn-az-primary float-sm-right">
				<i class="typcn typcn-pencil"></i> Ubah Data Kepegawaian
			  </a>
            </div><!-- col-4 -->
          </div><!-- row -->
		  <br><hr>
		  <br>
		  <div class="az-content-label mg-b-5">Riwayat Jabatan</div>
		  <br>
          <div class="table-responsive">
            <table class="table table-hover mg-b-0">
              <thead>
                <tr>
                  <th>No</th>
                  <th>Unit Kerja</th>
                  <th>Jabatan</th>
                  <th>Tahun</th>
                </tr>
              </thead>
              <tbody>
				<?php
					if($jabatan == NULL)
					{
						?>
						<tr>
							<td colspan="4"><center>Tidak ada riwayat jabatan.</center></td>
						</tr>
						<?php
					}
					else
					{
						$no = 0;
						foreach($jabatan as $jb)
						{
							$no++;
							?>
							<tr>
							  <th scope="row"><?php echo $no;?></th>
							  <td><?php echo $jb['unit_kerja'];?></td>
							  <td><?php echo $jb['jabatan'];?></td>
							  <td><?php echo $jb['tahun'];?></td>
							</tr>
							<?php
						}
					}
				?>
              </tbody>
            </table>
          </div><!-- table-responsive -->
		  <br><hr>
		  <br>
		  <div class="az-content-label mg-b-5">Riwayat SK</div>
		  <br>
          <div class="table-responsive">
            <table class="table table-hover mg-b-0">
              <thead>
                <tr>
                  <th>No</th>
                  <th>Nomor SK</th>
                  <th>Tahun</th>
                  <th>Status Kepegawaian</th>
                </tr>
              </thead>
              <tbody>
				<?php
					if($riwayat_sk == NULL)
					{
						?>
						<tr>
							<td colspan="4"><center>Tidak ada riwayat SK.</center></td>
						</tr>
						<?php
					}
					else
					{
						$no = 0;
						foreach($riwayat_sk as $rsk)
						{
							$no++;
							?>
							<tr>
							  <th scope="row"><?php echo $no;?></th>
							  <td><?php echo $rsk['nomor_sk'];?></td>
							  <td><?php echo $rsk['tahun'];?></td>
							  <td><?php echo $rsk['status_kepegawaian'];?></td>
							</tr>
							<?php
						}
					}
				?>
              </tbody>
            </table>
          </div><!-- table-responsive -->
		  <br><hr>
		  <br>
		  <div class="az-content-label mg-b-5">Riwayat Nilai</div>
		  <br>
          <div class="table-responsive">
            <table class="table table-hover mg-b-0">
              <thead>
                <tr>
                  <th>No</th>
                  <th>Tahun</th>
                  <th>Nilai</th>
                  <th>Catatan</th>
                </tr>
              </thead>
              <tbody>
				<?php
					if($nilai_pegawai == NULL)
					{
						?>
						<tr>
							<td colspan="4"><center>Tidak ada riwayat nilai pegawai.</center></td>
						</tr>
						<?php
					}
					else
					{
						$no = 0;
						foreach($nilai_pegawai as $np)
						{
							$no++;
							?>
							<tr>
							  <th scope="row"><?php echo $no;?></th>
							  <td><?php echo $np['tahun'];?></td>
							  <td><?php echo $np['nilai'];?></td>
							  <td><?php echo ($np['catatan'] != NULL ? $np['catatan'] : "-");?></td>
							</tr>
							<?php
						}
					}
				?>
              </tbody>
            </table>
          </div><!-- table-responsive -->
		  <br><hr>
		  <br>
		  <div class="az-content-label mg-b-5">Riwayat Pembinaan</div>
		  <br>
          <div class="table-responsive">
            <table class="table table-hover mg-b-0">
              <thead>
                <tr>
                  <th>No</th>
                  <th>Tahun</th>
                  <th>Nomor Surat</th>
                  <th>Keterangan</th>
                </tr>
              </thead>
              <tbody>
				<?php
					if($riwayat_pembinaan == NULL)
					{
						?>
						<tr>
							<td colspan="4"><center>Tidak ada riwayat pembinaan.</center></td>
						</tr>
						<?php
					}
					else
					{
						$no = 0;
						foreach($riwayat_pembinaan as $rp)
						{
							$no++;
							?>
							<tr>
							  <th scope="row"><?php echo $no;?></th>
							  <td><?php echo $rp['tahun'];?></td>
							  <td><?php echo $rp['nomor_surat'];?></td>
							  <td><?php echo $rp['keterangan'];?></td>
							</tr>
							<?php
						}
					}
				?>
              </tbody>
            </table>
          </div><!-- table-responsive -->
		  <?php /**
		  <hr>
		  <br>
		  <div class="az-content-label mg-b-5">Riwayat Perubahan Gaji</div>
		  <br>
          <div class="table-responsive">
            <table class="table table-hover mg-b-0">
              <thead>
                <tr>
                  <th>Perubahan Ke-</th>
                  <th>Gaji</th>
                  <th>Mulai Berlaku</th>
                  <th>Alasan Perubahan Gaji</th>
                </tr>
              </thead>
              <tbody>
				<?php
					if($gaji == NULL)
					{
						?>
						<tr>
							<td colspan="4"><center>Tidak ada gaji.</center></td>
						</tr>
						<?php
					}
					else
					{
						$no = 0;
						foreach($gaji as $g)
						{
							$no++;
							?>
							<tr>
							  <th scope="row"><?php echo $no;?></th>
							  <td>Rp <?php echo number_format($g['gaji'],0,",",".");?></td>
							  <td><?php echo $g['mulai_berlaku'];?></td>
							  <td><?php echo $g['alasan_perubahan_gaji'];?></td>
							</tr>
							<?php
						}
					}
				?>
              </tbody>
            </table>
          </div><!-- table-responsive -->
		  **/ ?>
		</div>
      </div>
    </div><!-- az-content -->

    <div class="az-footer ht-40">
      <div class="container ht-100p pd-t-0-f">
        <span class="text-muted d-block text-center text-sm-left d-sm-inline-block">Copyright © 2022 Sistem Informasi Pegawai</span>
        <span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center"> Dikembangkan oleh <a href="https://nurul-islam.sch.id" target="_blank">Yayasan Nurul Islam</a></span>
      </div><!-- container -->
    </div><!-- az-footer -->


    <script src="<?php echo base_url();?>assets/pegawai/lib/jquery/jquery.min.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/lib/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/lib/ionicons/ionicons.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/lib/jquery.flot/jquery.flot.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/lib/jquery.flot/jquery.flot.resize.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/lib/chart.js/Chart.bundle.min.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/lib/peity/jquery.peity.min.js"></script>

    <script src="<?php echo base_url();?>assets/pegawai/js/azia.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/js/chart.flot.sampledata.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/js/dashboard.sampledata.js"></script>
    <script src="<?php echo base_url();?>assets/pegawai/js/jquery.cookie.js" type="text/javascript"></script>
    <script>
      $(function(){
        'use strict'

    		var plot = $.plot('#flotChart', [{
          data: flotSampleData3,
          color: '#007bff',
          lines: {
            fillColor: { colors: [{ opacity: 0 }, { opacity: 0.2 }]}
          }
        },{
          data: flotSampleData4,
          color: '#560bd0',
          lines: {
            fillColor: { colors: [{ opacity: 0 }, { opacity: 0.2 }]}
          }
        }], {
    			series: {
    				shadowSize: 0,
            lines: {
              show: true,
              lineWidth: 2,
              fill: true
            }
    			},
          grid: {
            borderWidth: 0,
            labelMargin: 8
          },
    			yaxis: {
            show: true,
    				min: 0,
    				max: 100,
            ticks: [[0,''],[20,'20K'],[40,'40K'],[60,'60K'],[80,'80K']],
            tickColor: '#eee'
    			},
    			xaxis: {
            show: true,
            color: '#fff',
            ticks: [[25,'OCT 21'],[75,'OCT 22'],[100,'OCT 23'],[125,'OCT 24']],
          }
        });

        $.plot('#flotChart1', [{
          data: dashData2,
          color: '#00cccc'
        }], {
    			series: {
    				shadowSize: 0,
            lines: {
              show: true,
              lineWidth: 2,
              fill: true,
              fillColor: { colors: [ { opacity: 0.2 }, { opacity: 0.2 } ] }
            }
    			},
          grid: {
            borderWidth: 0,
            labelMargin: 0
          },
    			yaxis: {
            show: false,
            min: 0,
            max: 35
          },
    			xaxis: {
            show: false,
            max: 50
          }
    		});

        $.plot('#flotChart2', [{
          data: dashData2,
          color: '#007bff'
        }], {
    			series: {
    				shadowSize: 0,
            bars: {
              show: true,
              lineWidth: 0,
              fill: 1,
              barWidth: .5
            }
    			},
          grid: {
            borderWidth: 0,
            labelMargin: 0
          },
    			yaxis: {
            show: false,
            min: 0,
            max: 35
          },
    			xaxis: {
            show: false,
            max: 20
          }
    		});


        //-------------------------------------------------------------//


        // Line chart
        $('.peity-line').peity('line');

        // Bar charts
        $('.peity-bar').peity('bar');

        // Bar charts
        $('.peity-donut').peity('donut');

        var ctx5 = document.getElementById('chartBar5').getContext('2d');
        new Chart(ctx5, {
          type: 'bar',
          data: {
            labels: [0,1,2,3,4,5,6,7],
            datasets: [{
              data: [2, 4, 10, 20, 45, 40, 35, 18],
              backgroundColor: '#560bd0'
            }, {
              data: [3, 6, 15, 35, 50, 45, 35, 25],
              backgroundColor: '#cad0e8'
            }]
          },
          options: {
            maintainAspectRatio: false,
            tooltips: {
              enabled: false
            },
            legend: {
              display: false,
                labels: {
                  display: false
                }
            },
            scales: {
              yAxes: [{
                display: false,
                ticks: {
                  beginAtZero:true,
                  fontSize: 11,
                  max: 80
                }
              }],
              xAxes: [{
                barPercentage: 0.6,
                gridLines: {
                  color: 'rgba(0,0,0,0.08)'
                },
                ticks: {
                  beginAtZero:true,
                  fontSize: 11,
                  display: false
                }
              }]
            }
          }
        });

        // Donut Chart
        var datapie = {
          labels: ['Search', 'Email', 'Referral', 'Social', 'Other'],
          datasets: [{
            data: [25,20,30,15,10],
            backgroundColor: ['#6f42c1', '#007bff','#17a2b8','#00cccc','#adb2bd']
          }]
        };

        var optionpie = {
          maintainAspectRatio: false,
          responsive: true,
          legend: {
            display: false,
          },
          animation: {
            animateScale: true,
            animateRotate: true
          }
        };

        // For a doughnut chart
        var ctxpie= document.getElementById('chartDonut');
        var myPieChart6 = new Chart(ctxpie, {
          type: 'doughnut',
          data: datapie,
          options: optionpie
        });

      });
    </script>
  </body>
</html>
