<div id="content" class="main-content">
    <div class="layout-px-spacing">
        <?= $this->session->flashdata('pesan_berhasil'); ?>
        <?= $this->session->flashdata('pesan_gagal'); ?>
        <div class="row layout-top-spacing">
            <div class="col-lg-12">
                <blockquote class="blockquote media-object">
                    <div class="media">
                        <div class="media-body align-self-center">
                            <button style="float: right;" type="button" class="btn btn-primary mb-2 mr-2 btn-rounded"
                                data-toggle="modal" data-target="#tambahDataKeluarga">
                                <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-edit">
                                    <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
                                    <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
                                </svg> Tambah
                            </button>
                            <p class="d-inline">
                                Keluarga Anggota Arisan
                            </p>
                        </div>
                    </div>
                    <small class="text-left"><cite
                            title="Source Title"><?= $this->mycustom->hariIndo(date('l', strtotime(date('Y-m-d')))) ?>,
                            <?= date('d', strtotime(date('Y-m-d')))  ?>
                            <?= $this->mycustom->bulanIndo(date('m', strtotime(date('Y-m-d'))))  ?>
                            <?= date('Y', strtotime(date('Y-m-d')))  ?></cite></small>
                </blockquote>
            </div>
        </div>
        <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">NIK Kepala Keluarga</th>
                                    <th class="text-center">Alamat</th>
                                    <th class="text-center">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $no = 1; ?>
                                <?php foreach ($keluarga_arisan as $Anggota_keluarga) : ?>
                                <tr>
                                    <td class="text-left">
                                        <?= $no ?>
                                    </td>
                                    <td class="text-left">
                                        NIK : <?= $Anggota_keluarga->nik ?><br>
                                        Nama : <?= $Anggota_keluarga->nm_anggota ?><br>
                                        No HP : <?= $Anggota_keluarga->no_hp ?>
                                    </td>
                                    <td class="text-left">
                                        <?= $Anggota_keluarga->alamat_lengkap ?><br>
                                        RT. <?= $Anggota_keluarga->nm_rt ?> RW. <?= $Anggota_keluarga->nm_rw ?><br>
                                        Dk. <?= $Anggota_keluarga->nm_desa ?>, Kec.
                                        <?= $Anggota_keluarga->nm_kecamatan ?><br>
                                        Kab. Kudus, Kode Pos : <?= $Anggota_keluarga->kd_pos ?>
                                    </td>

                                    <td class="text-center">
                                        <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 class="dropdown-item"
                                                    href="<?= base_url('arisan/data/anggota_keluarga/hapus/' . $this->encrypt->encode($Anggota_keluarga->kepala_id)) ?>">Hapus
                                                    Keluarga</a>
                                                <a class="dropdown-item"
                                                    href="<?= base_url('arisan/data/anggota_keluarga/kelompok/' . $this->encrypt->encode($Anggota_keluarga->kepala_id)) ?>">Detail
                                                    Keluarga</a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <?php $no++; ?>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('arisan/keloladata/keluarga/tambah_keluarga'); ?>