<?php if ($data->num_rows() > 0) { ?>
    <div class="col-md-12">
        <div class="row">
            <?php
            foreach ($data->result() as $key) {
            ?>
                <div class="col-md-4">
                    <div class="card card-rounded card-abu">
                        <div class="card-header"><?= strtoupper(keterangan_action($this->lang->line('data_kelengkapan_file'), $key->action)) ?></div>
                        <div class="card-body">
                            <?= pengajuan($key->status_pengajuan, $key->ket_revisi) ?>
                            <div class="row">
                                <div class="col-md-12">
                                    <?php
                                    $file = $this->config->item('base_image') . 'imagebiodata?_t=file&_d=' . $key->file;
                                    ?>
                                    <a href="<?= $file ?>" target="_blank">
                                        <img src="<?= $file ?>" width="100%" height="auto"></a>
                                </div>
                            </div>
                            <div class="row mt-1">
                                <div class="col-md-12 text-center">
                                    <?= isset($key->nama_dokumen) ? $key->nama_dokumen : "-" ?>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12 text-center">
                                    <div class="card-footer">
                                        <?php if ($key->status_pengajuan == '1') { ?>
                                            <button class="btn btn-success btn-min-width" onclick="form_approve('<?= md5($key->id_kelengkapan_file) ?>');"><i class="fa fa-check"></i> <?= $this->lang->line('button_form_approve') ?></button>
                                            <button class="btn btn-secondary btn-min-width" onclick="form_revisi('<?= md5($key->id_kelengkapan_file) ?>');"><i class="fa fa-undo"></i> <?= $this->lang->line('button_form_revisi') ?></button>
                                        <?php } elseif ($key->status_pengajuan == '4') { ?>
                                            <button class="btn btn-danger btn-min-width" onclick="form_hapus('<?= md5($key->id_kelengkapan_file) ?>');"><i class="fa fa-check"></i> <?= $this->lang->line('button_form_hapus') ?></button>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <?php } ?>
        </div>
    </div>
<?php } else { ?>
    <div class="col-12"><?= $this->lang->line('data_tidak_ditemukan') ?></div>
<?php } ?>
