<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">Bulan KPI</th>
                            <th class="text-center">Nilai Angka</th>
                            <th class="text-center">Nilai Huruf</th>
                            <th class="text-center">Status</th>
                            <th class="text-center">Aksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $no = 1; ?>
                        <?php foreach ($kpi as $Kpi) : ?>
                        <tr>
                            <td>
                                <center><?= $no ?></center>
                            </td>
                            <td class="text-left">
                                <?= $this->mycustom->bulanIndo(date('m', strtotime($Kpi->bln_kpi)))  ?>
                                <?= date('Y', strtotime($Kpi->bln_kpi))  ?>
                            </td>
                            <td class="text-center">
                                <?= $Kpi->nilai_angka ?>
                            </td>
                            <td class="text-center">
                                <?= $Kpi->nilai_huruf ?>
                            </td>
                            <td class="text-center">
                                <?php
                                    if ($Kpi->sts_hasil == 'PROSES') : ?>
                                <span class="shadow-none badge badge-danger">PROSES</span>
                                <?php else : ?>
                                <span class="shadow-none badge badge-success">SELESAI</span>
                                <?php endif; ?>
                            </td>
                            <td class="text-center">
                                <a class="btn btn-primary btn-sm"
                                    href="<?= base_url('marketing/kpi/detail_kpi/' . $this->encrypt->encode($Kpi->id)) ?>"
                                    style="color: white;">Detail</a>
                            </td>
                        </tr>
                        <?php $no++; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>