<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-10" class="table style-10  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 ($karyawan_aktif as $Karyawan_aktif) : ?>
                        <tr>
                            <td class="text-left">
                                <?= $no ?>
                            </td>
                            <td class="text-left">
                                <?= $Karyawan_aktif->nm_panggilan ?>
                            </td>
                            <td class="text-left">
                                <?= $Karyawan_aktif->email ?><br>
                                <?= $Karyawan_aktif->no_hp ?>
                            </td>
                            <td class="text-center">
                                <?php
                                    if ($Karyawan_aktif->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 ($Karyawan_aktif->role_id == '1') : ?>
                                <span class="shadow-none badge badge-success"><?= $Karyawan_aktif->role_level ?></span>
                                <?php elseif ($Karyawan_aktif->role_id == '2') : ?>
                                <span class="shadow-none badge badge-primary"><?= $Karyawan_aktif->role_level ?></span>
                                <?php elseif ($Karyawan_aktif->role_id == '3') : ?>
                                <span class="shadow-none badge badge-warning"><?= $Karyawan_aktif->role_level ?></span>
                                <?php elseif ($Karyawan_aktif->role_id == '4') : ?>
                                <span
                                    class="shadow-none badge badge-secondary"><?= $Karyawan_aktif->role_level ?></span>
                                <?php elseif ($Karyawan_aktif->role_id == '5') : ?>
                                <span class="shadow-none badge badge-warning"><?= $Karyawan_aktif->role_level ?></span>
                                <?php elseif ($Karyawan_aktif->role_id == '6') : ?>
                                <span class="shadow-none badge badge-danger"><?= $Karyawan_aktif->role_level ?></span>
                                <?php elseif ($Karyawan_aktif->role_id == '7') : ?>
                                <span class="shadow-none badge badge-danger"><?= $Karyawan_aktif->role_level ?></span>
                                <?php else : ?>
                                <span class="shadow-none badge badge-danger"><?= $Karyawan_aktif->role_level ?></span>
                                <?php endif; ?>
                            </td>
                            <td class="text-center">
                                <a class="btn btn-primary btn-sm"
                                    href="<?= base_url('keuangan/identitas/karyawan/' . $this->encrypt->encode($Karyawan_aktif->login_id)) ?>">Detail</a>
                            </td>
                        </tr>
                        <?php $no++; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>