
<div class="content-wrapper">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1><?= $title; ?></h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="#"><?= $root; ?></a></li>
                        <li class="breadcrumb-item active"><?= $title; ?></li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>
    <div class="container-fluid mt-3">
        <div class="card">
            <div class="card-header text-center">
                <h2>Info Pengembalian Inventaris</h2>
            </div>
            <div class="card-body">
                <?php echo $this->session->flashdata('notif'); ?>
                <div class="table-responsive">
                    <table id="tabel" class="table table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>No</th>
                                <th>Nama Peminjam </th>
                                <th>Nama Inventaris</th>
                                <th>Tanggal Peminjaman</th>
                                <th>Yang Melayani</th>
                                <th>Tanggal Pengembalian</th>
                                <th>Yang Menerima</th>
                                <th>Aksi</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $no = 1; ?>
                            <?php  foreach ($pengembalian as $pg) : ?>
                                <tr>
                                    <td><?php echo $no++; ?></td>
                                    <td><?php echo $pg->nama_lengkap; ?></td>
                                    <td><?php echo $pg->nama_inv; ?></td>
                                    <td><?php $date = date_create($pg->tgl_pinjam);
		                                echo date_format($date, 'd/m/Y'); ?></td>
                                    <td><?php echo $pg->yg_melayani;?></td>
                                    <td><?php $date = date_create($pg->tgl_pengembalian);
		                                echo date_format($date, 'd/m/Y'); ?></td>
                                    <td><?php echo $pg->yg_menerima;?></td>
                                    <td>
                                    <a href="<?php echo base_url('inventaris/hapuspengembalianinv/' . $pg->id_pengembalian) ?>" onclick="return confirm('Apakah Yakin Data Dihapus?')" class="badge badge-danger">Hapus</a>

                                    </td>
                                </tr>
                                <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>