<div class="row layout-spacing">
    <div class="col-lg-12">
        <div class="statbox widget box box-shadow">
            <div class="widget-content widget-content-area">
                <table id="style-3" class="table style-3  table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">No</th>
                            <th class="text-center">Nama</th>
                            <th class="text-center">Kontak</th>
                            <th class="text-center">Status</th>
                            <th class="text-center">Skor Kerja</th>
                            <th class="text-center">Aksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $no = 1; ?>
                        <?php foreach ($data_marketing as $Anggota_karyawan) : ?>
                        <tr>
                            <td class="text-left">
                                <?= $no ?>
                            </td>
                            <td class="text-left">
                                <?= $Anggota_karyawan->nm_panggilan ?>
                            </td>
                            <td class="text-left">
                                <?= $Anggota_karyawan->email ?><br>
                                <?= $Anggota_karyawan->no_hp ?>
                            </td>
                            <td class="text-center">
                                <?php
                                    if ($Anggota_karyawan->status_akun == 'AKTIF') : ?>
                                <span class="shadow-none badge badge-success">AKTIF</span>
                                <?php else : ?>
                                <span class="shadow-none badge badge-danger">PASIF</span>
                                <?php endif;
                                    ?>
                            </td>
                            <td class="text-center">
                                <?php
                                    foreach ($nilai_kpi as $Kpi) :
                                        if ($Kpi->login_id == $Anggota_karyawan->id) :
                                            echo $Kpi->nilai_angka . ' <br> ( ' . $Kpi->nilai_huruf . ' )';
                                        endif;
                                    endforeach;
                                    ?>
                            </td>
                            <td class="text-center">
                                <a class="btn btn-primary btn-sm"
                                    href="<?= base_url('kabag_marketing/marketing_aktifitas/pinjaman/' . $this->encrypt->encode($Anggota_karyawan->id)) ?>"
                                    style="color: white;">Detail</a>
                            </td>
                        </tr>
                        <?php $no++; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>