<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">Level</th>
                            <th class="text-center">Aksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $no = 1; ?>
                        <?php foreach ($anggota_karyawan 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 if ($Anggota_karyawan->role_id == '1') : ?>
                                        <span class="shadow-none badge badge-success"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php elseif ($Anggota_karyawan->role_id == '2') : ?>
                                        <span class="shadow-none badge badge-primary"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php elseif ($Anggota_karyawan->role_id == '3') : ?>
                                        <span class="shadow-none badge badge-warning"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php elseif ($Anggota_karyawan->role_id == '4') : ?>
                                        <span class="shadow-none badge badge-secondary"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php elseif ($Anggota_karyawan->role_id == '5') : ?>
                                        <span class="shadow-none badge badge-warning"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php elseif ($Anggota_karyawan->role_id == '6') : ?>
                                        <span class="shadow-none badge badge-danger"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php elseif ($Anggota_karyawan->role_id == '7') : ?>
                                        <span class="shadow-none badge badge-danger"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php else : ?>
                                        <span class="shadow-none badge badge-danger"><?= $Anggota_karyawan->role_level ?></span>
                                    <?php endif;
                                    ?>
                                </td>
                                <td class="text-center">
                                    <a class="btn btn-primary btn-sm" href="<?= base_url('kabag_marketing/identitas/karyawan/' . $this->encrypt->encode($Anggota_karyawan->login_id)) ?>">Detail</a>
                                </td>
                            </tr>
                            <?php $no++; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>