<!-- Page Heading -->



          <!-- <h1 class="h3 mb-2 text-gray-800">Tables</h1>



          <p class="mb-4">DataTables is a third party plugin that is used to generate the demo table below. For more information about DataTables, please visit the <a target="_blank" href="https://datatables.net">official DataTables documentation</a>.</p> -->







          <!-- DataTales Example -->







  







          <div class="card shadow mb-4">



            <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">



                  <h6 class="m-0 font-weight-bold text-primary">Data Revisi Evaluasi PKA</h6>



                  <div class="dropdown no-arrow">



                    <!-- <span class="text-info">Sesi evaluasi PKA ini akan ditutup pada : &nbsp</span><b><i id="demo1" class="text-danger"></i></b> -->



                  </div>



            </div>



            <div class="card-body">



              <div class="table-responsive">



                <table class="table table-bordered" id="tabel_data_pka" width="100%" cellspacing="0">



                  <thead>



                    <tr>



                          <th>No</th>



                          <th>Unit Misioner</th>



                          <th>Email</th>



                          <th>Jml Page</th>



                          <th>Tanggal Pembuatan</th>



                          <th>Dibuat Oleh</th>



                          <th>Aksi</th>



                    </tr>



                  </thead>



                  <!-- <tfoot>



                    <tr>



                      <th>Name</th>



                      <th>Position</th>



                      <th>Office</th>



                      <th>Age</th>



                      <th>Start date</th>



                      <th>Salary</th>



                    </tr>



                  </tfoot> -->



                  <tbody>



                  </tbody>



                </table>



              </div>



            </div>



          </div>



<script type="text/javascript">



$(document).ready(function(){



    



    var base_url = "<?=base_url()?>";



    



    var data_pka = function(){



        $('#tabel_produk').hide();



        $.ajax({ 



            url: base_url + 'pka/data_rev_ev_pka',



            type: "post",



            // data:{<?php echo $this->security->get_csrf_token_name(); ?>:'<?php echo $this->security->get_csrf_hash(); ?>'},



            // data:{},



            dataType: "json",



            async : 'false',



            success: function(result){



            //   alert(JSON.stringify(result))



              var data = [];



                for ( var i=0 ; i<result.length ; i++ ) {



                    var no = i+1;



                    if(result[i].acc_ev == "2"){



                      var link_refisi = `<a href="javascript:void(0)" onclick="getpopup('Popup/revisi_evaluasi_pka','popupevaluasi','`+result[i].no_pka+`');" class="btn btn-info btn-icon-split btn-sm">



                                        <span class="icon text-white-50">



                                          <i class="fas fa-file-upload"></i>



                                        </span>



                                        <span class="text">Revisi</span>



                                      </a>`;



                      var link_evaluasi = "";



                    }else{



                      var link_refisi = ``;



                      var link_evaluasi = `<a href="javascript:void(0)" onclick="getpopup('Popup/detail_evaluasi_pka','popupevaluasi','`+result[i].no_pka+`');" class="btn btn-primary btn-icon-split btn-sm">



                                        <span class="icon text-white-50">



                                          <i class="fas fa-sticky-note"></i>



                                        </span>



                                        <span class="text">Detail Evaluasi</span>



                                      </a>`;



                    }



                    data.push([no,result[i].nm_um,result[i].email,result[i].jml_page+" Page",result[i].tgl_buat+"<br>"+result[i].waktu_buat,result[i].username,link_refisi+link_evaluasi]);



                }



                $('#tabel_data_pka').DataTable({



                    //"bJQueryUI"     : true,



                    data                : data,



                    deferRender         : true,



                    processing          : true,



                    ordering            : true,



                    retrieve            : false,



                    paging              : true,



                    deferLoading        : 57,



                    bDestroy            : true,



                    autoWidth           : false,



                    bFilter             : true,



                    iDisplayLength      : 10,



                    responsive: true,



                    language: {



                      searchPlaceholder: 'Cari',



                      sSearch: '',



                      lengthMenu: '_MENU_',



                    },



                });



               



            },



            beforeSend: function () {







            },



            complete: function () {



                // $('#tabel_produk').show();



            }



        });



    }



    data_pka();



  });



</script>



