

<main id="main" class="main">

<section class="section">
  <div class="row">
    <div class="col-lg-12">

      <div class="card">
          <div class="card-header mb-4">
            <div class="row">
              <div class="col-sm-6">
                <h4 class="text-dark"><?= $title; ?></h4>
              </div>
             </div>

        </div>
        <div class="card-body">
          <div>
            <table class="table table-striped table-hover" id="mytable">
                <thead>
                  <tr>
                      <th scope="col">S.No.</th>
                      <th scope="col">Offering category</th>
                      <th scope="col">Name</th>
                      <th scope="col">Hourly Rate (INR)</th>
                      <th scope="col">Hourly Rate (USD)</th>
                      <th scope="col">Created</th>
                      <th scope="col">Action</th>
                  </tr>
                </thead>
                <tbody>
                  <?php $i=1; foreach($list as $val) { ?>
                  <tr>
                    <th scope="row"><?= $val['id']; ?></th>
                    <td><?= $val['offering_category_name']; ?></td>
                    <td><?= $val['name']; ?></td>
                    <td><?= $val['inr_hourly_rate']; ?></td>
                    <td><?= $val['usd_hourly_rate']; ?></td>
                    <td><?= date('d-m-Y',strtotime($val['created']));?></td>
                    <td>
                      <a href="<?= base_url('offering-detail/'.$val['id'].'') ?>" class="btn btn-primary btn-sm" target="_blank">View</a> 
                      <a href="javascript:void(0)" class="btn btn-info btn-sm edit-btn" onclick="editData(<?= $val['id']; ?>)" data-bs-toggle="modal" data-bs-target="#editModal">Edit</a>
                      <?php if($val['is_disable'] == '0'){ ?>
                          <a href="javascript:void(0)" class="btn btn-danger btn-sm disable-btn disable-btn" onclick="changeStatus(<?= $val['id']; ?>,'1')">Disable</a>
                      <?php } else{ ?>
                          <a href="javascript:void(0)" class="btn btn-success btn-sm disable-btn disable-btn" onclick="changeStatus(<?= $val['id']; ?>,'0')">Enable</a>
                      <?php } ?> 
                    </td>
                  </tr>
                  <?php } ?>
                </tbody>
            </table>
          </div>
        </div>
      </div>

    </div>
  </div>
</section>

</main><!-- End #main -->
