<!-- Begin Page Content -->
<div class="container-fluid">

  <!-- Page Heading -->
  <h1 class="h3 mb-2 text-gray-800">Daftar Jadwal</h1>

  <!-- DataTales Example -->
  <div class="card shadow mb-4">
    <div class="card-header py-3">
      <a href="<?php echo base_url(); ?>admin/jadwal/tambah">
        <button type="button" name="button" class="btn btn-primary float-right">Tambah Jadwal</button>
      </a>
    </div>
    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
          <thead>
            <tr>
              <th>No</th>
              <th>Jenis</th>
              <th>Tanggal</th>
              <th>Jam</th>
              <th>Keterangan</th>
              <th>Harga</th>
              <th>Nama Pendaftar</th>
              <th>Nomor Pendaftar</th>
              <th>Edit</th>
            </tr>
          </thead>
          <tbody>
            <?php
            $no = 1;
            foreach ($jadwal as $data) {
            ?>
            <tr>
              <td><?php echo $no; ?></td>
              <td><?php echo $data->jenis; ?></td>
              <td><?php echo date('d-m-Y',strtotime($data->tgl)); ?></td>
              <td><?php echo $data->jam; ?></td>
              <td><?php echo $data->keterangan; ?></td>
              <td><?php echo number_format($data->harga); ?></td>
              <td><?php echo $data->nama_pendaftar; ?></td>
              <td><?php echo $data->nomor_pendaftar; ?></td>
              <td>
                <a href="<?php echo base_url(); ?>admin/jadwal/edit/<?php echo $data->id; ?>" class="btn btn-warning btn-icon-split btn-sm">
                    <span class="icon text-white-50">
                      <i class="fas fa-edit"></i>
                    </span>
                    <span class="text">Edit</span>
                </a>
                <a href="<?php echo base_url(); ?>admin/jadwal/hapus/<?php echo $data->id; ?>" class="btn btn-danger btn-icon-split btn-sm">
                    <span class="icon text-white-50">
                      <i class="fas fa-times"></i>
                    </span>
                    <span class="text">Hapus</span>
                </a>
                <a href="<?php echo base_url(); ?>admin/jadwal/wa/<?php echo $data->id; ?>" class="btn btn-info btn-icon-split btn-sm">
                    <span class="icon text-white-50">
                      <i class="fas fa-message"></i>
                    </span>
                    <span class="text">Send WA</span>
                </a>
              </td>
            </tr>
            <?php
            $no++;
            }
             ?>
          </tbody>
        </table>
      </div>
    </div>
  </div>

</div>
<!-- /.container-fluid -->
