<div id="content" class="main-content">
    <div class="layout-px-spacing">
        <div class="row layout-top-spacing">
            <div class="col-lg-12">
                <div class="statbox widget box box-shadow">
                    <div class="widget-content widget-content-area">
                        <h4 class="">Daftar Arisan Heboh</h4>
                        <table id="style-3" class="table style-3  table-hover">
                            <thead>
                                <tr>
                                    <th class="text-center">No</th>
                                    <th class="text-center">Kelompok</th>
                                    <th class="text-center">Anggota</th>
                                    <th class="text-center">Pembayaran</th>
                                    <th class="text-center">Status</th>
                                    <th class="text-center">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $no = 1; ?>
                                <?php foreach ($data_arisan_heboh as $Data_arisan_heboh) : ?>
                                <tr>
                                    <td>
                                        <center><?= $no ?></center>
                                    </td>
                                    <td class="text-left">
                                        Kelompok : <?= $Data_arisan_heboh->nm_kelompok ?><br>
                                        Registrasi : <?= $Data_arisan_heboh->regist_arisan ?>
                                    </td>
                                    <td class="text-left">
                                        <?php foreach ($jml_anggota as $Jml_anggota) :
                                                if ($Data_arisan_heboh->regist_arisan == $Jml_anggota->regist_arisan) :
                                                    $total = $Jml_anggota->anggota;
                                                    echo 'Aktif : ' . $total . ' Anggota <br>';
                                                endif;
                                            endforeach;
                                            ?>
                                        <?php foreach ($anggota_menang as $Anggota_menang) :
                                                if ($Data_arisan_heboh->regist_arisan == $Anggota_menang->regist_arisan) :
                                                    $total = $Anggota_menang->anggota;
                                                    echo 'Menang : ' . $total . ' Anggota <br>';
                                                endif;
                                            endforeach;
                                            ?>
                                        <?php foreach ($anggota_mundur as $Anggota_mundur) :
                                                if ($Data_arisan_heboh->regist_arisan == $Anggota_mundur->regist_arisan) :
                                                    $total = $Anggota_mundur->anggota;
                                                    echo 'Mundur : ' . $total . ' Anggota <br>';
                                                endif;
                                            endforeach;
                                            ?>
                                    </td>
                                    <td class="text-left">
                                        Iuran /Bulan : Rp
                                        <?= number_format($Data_arisan_heboh->tagihan_iuran, 0, ',', '.') ?> ,-
                                        @<?= $Data_arisan_heboh->tempo ?> Bulan<br>
                                        Fee Admin : Rp
                                        <?= number_format($Data_arisan_heboh->admin_arisan, 0, ',', '.') ?>
                                        ,-<br>
                                        Potongan Awal : Rp
                                        <?= number_format($Data_arisan_heboh->hg_standar, 0, ',', '.') ?> ,-<br>
                                    </td>
                                    <td class="text-center">
                                        <?php
                                            if ($Data_arisan_heboh->status_arisan == 'PROSES') : ?>
                                        <span
                                            class="shadow-none badge badge-primary"><?= $Data_arisan_heboh->status_arisan ?></span>
                                        <?php elseif ($Data_arisan_heboh->status_arisan == 'AKTIF') : ?>
                                        <span
                                            class="shadow-none badge badge-success"><?= $Data_arisan_heboh->status_arisan ?></span>
                                        <?php elseif ($Data_arisan_heboh->status_arisan == 'SELESAI') : ?>
                                        <span
                                            class="shadow-none badge badge-secondary"><?= $Data_arisan_heboh->status_arisan ?></span>
                                        <?php else : ?>
                                        <span
                                            class="shadow-none badge badge-danger"><?= $Data_arisan_heboh->status_arisan ?></span>
                                        <?php endif;
                                            ?>
                                    </td>
                                    <td class="text-center">
                                        <a class="btn btn-primary btn-sm"
                                            href="<?= base_url('owner/laporan_arisan/kelompok_heboh/list_laporan/' . $this->encrypt->encode($Data_arisan_heboh->regist_arisan)) ?>"
                                            style="color: white;">Laporan</a>
                                    </td>
                                </tr>
                                <?php $no++; ?>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>