<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">Kelompok</th>
                            <th class="text-center">Detail Kelompok</th>
                            <th class="text-center">Detail Pendapatan</th>
                            <th class="text-center">Status</th>
                            <th class="text-center">Aksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($data_arisanmotor as $Data_arisanmotor) : ?>
                        <tr>
                            <td class="text-left">
                                Arisan Motor <?= $Data_arisanmotor->ket_arisan ?><br>
                                Kelompok : <?= $Data_arisanmotor->nm_kelompok ?><br>
                                Registrasi : <?= $Data_arisanmotor->regist_arisan ?><br>
                                Target : <?= $Data_arisanmotor->target_anggota ?>
                            </td>
                            <td class="text-left">
                                Anggota : <?php
                                                foreach ($anggota_aktif as $Anggota_aktif) :
                                                    if ($Data_arisanmotor->regist_arisan == $Anggota_aktif->regist_arisan) :
                                                        $total = $Anggota_aktif->anggota;
                                                        echo $total;
                                                    endif;
                                                endforeach;
                                                ?> Anggota <br>
                                Pengajuan : <?php
                                                foreach ($data_pengajuan as $Data_pengajuan) :
                                                    if ($Data_arisanmotor->regist_arisan == $Data_pengajuan->regist_arisan) :
                                                        $total = $Data_pengajuan->anggota;
                                                        echo $total;
                                                    endif;
                                                endforeach;
                                                ?> Anggota
                                <br>Iuran /Bulan : Rp <?= $Data_arisanmotor->tagihan_iuran ?> ,-<br>
                                Tempo : <?= $Data_arisanmotor->tempo ?> Bulan
                            </td>
                            <td class="text-left">
                                Administrasi : Rp <?= $Data_arisanmotor->admin_arisan ?> ,-<br>
                                Dana Kehilangan : Rp <?= $Data_arisanmotor->dana_kehilangan ?> ,-<br>
                                Harga Standar : Rp <?= $Data_arisanmotor->hg_standar ?> ,-<br>
                                Saldo Anggota : Rp <?= $Data_arisanmotor->hg_standar ?> ,-<br>
                            </td>
                            <td class="text-center">
                                <?php
                                    if ($Data_arisanmotor->status_arisan == 'PROSES') : ?>
                                <span
                                    class="shadow-none badge badge-primary"><?= $Data_arisanmotor->status_arisan ?></span>
                                <?php elseif ($Data_arisanmotor->status_arisan == 'AKTIF') : ?>
                                <span
                                    class="shadow-none badge badge-success"><?= $Data_arisanmotor->status_arisan ?></span>
                                <?php elseif ($Data_arisanmotor->status_arisan == 'SELESAI') : ?>
                                <span
                                    class="shadow-none badge badge-secondary"><?= $Data_arisanmotor->status_arisan ?></span>
                                <?php else : ?>
                                <span
                                    class="shadow-none badge badge-danger"><?= $Data_arisanmotor->status_arisan ?></span>
                                <?php endif;
                                    ?>
                            </td>
                            <td class="text-center">
                                <?php if ($Data_arisanmotor->status_arisan == 'PROSES') : ?>
                                <div class="btn-group mr-2">
                                    <button class="btn btn-primary btn-sm dropdown-toggle" style="width: 100px;"
                                        type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                        Pilih Aksi <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round"
                                            class="feather feather-chevron-down">
                                            <polyline points="6 9 12 15 18 9"></polyline>
                                        </svg>
                                    </button>
                                    <div class="dropdown-menu">
                                        <a href="javascript:void(0);" class="dropdown-item" id="detail_arisan"
                                            data-target="#arisan_detail" class="bs-tooltip" data-toggle="modal"
                                            data-regist_arisan="<?= $Data_arisanmotor->regist_arisan ?>"
                                            data-nm_kelompok="<?= $Data_arisanmotor->ket_arisan ?>"
                                            data-target_anggota="<?= $Data_arisanmotor->target_anggota ?>"
                                            data-tagihan_iuran="<?= $Data_arisanmotor->tagihan_iuran ?>"
                                            data-hg_standar="<?= $Data_arisanmotor->hg_standar ?>"
                                            data-admin_arisan="<?= $Data_arisanmotor->admin_arisan ?>"
                                            data-dana_kehilangan="<?= $Data_arisanmotor->dana_kehilangan ?>">Update
                                            Data</a>
                                        <a class="dropdown-item"
                                            href="<?= base_url('arisan/data/kelompok_motor/kelompok/' . $this->encrypt->encode($Data_arisanmotor->regist_arisan)) ?>">Detail
                                            Data</a>
                                    </div>
                                </div>
                                <?php else : ?>
                                <a class="btn btn-primary btn-sm"
                                    href="<?= base_url('arisan/data/kelompok_motor/kelompok/' . $this->encrypt->encode($Data_arisanmotor->regist_arisan)) ?>">Detail</a>
                                <?php endif; ?>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>