<div class="col-sm-12">
  <div class="card">
    <div class="card-header">






      <div class="row align-items-center">
    <!-- Icon + Text -->
    <div class="col-md-9 d-flex align-items-center">
        <i class="material-icons-two-tone text-primary d-block f-46">alarm</i>

        <div>
          <h5 class="mb-0">
            List of all <span class="text-primary"><?= $total_sifts ?></span> Shift<?= ($total_sifts > 1) ? 's' : '' ?>
          </h5>
            <small>You can Edit or Delete (depending on rights)</small>
        </div>
    </div>

    <!-- Button -->
    <div class="col-md-3 text-end">
        <button class="btn btn-primary btn-sm btn-round" data-bs-toggle="modal" data-bs-target="#add_shifts_modal">
            Add New Shift
          </button>
    </div>
</div>





    </div>
    <div class="card-body">
      <div class="dt-responsive table-responsive">
        <table id="shifts-table" class="table table-striped table-bordered nowrap">
          <thead>
            <tr>
              <th>ID</th>
              <th>Name</th>
              <th>Description</th>
              <th>Start</th>
              <th>End</th>
              <th>Action</th>
            </tr>
          </thead>
          <tbody>
            <?php foreach($AllShifts as $row) : ?>
        <tr>
            <td><?php echo $row->id ?></td>
            <td><?php echo $row->name ?></td>
            <td><?php echo $row->description ?></td>
            <td><?php echo $row->start_time ?></td>
            <td><?php echo $row->end_time ?></td>
            <td>
<a href="#" class="badge bg-light-success edit-shift-btn"
   data-id="<?= $row->id ?>"
   data-name="<?= $row->name ?>"
   data-description="<?= $row->description ?>"
   data-start_time="<?= $row->start_time ?>"
   data-end_time="<?= $row->end_time ?>">
   <i data-feather="edit"></i>
</a>
  <a href="javascript:void(0);" class="badge bg-light-danger delete-confirmation-modal"
     data-url="<?= base_url('admin/shifts/delete/' . $row->id) ?>">
     <i data-feather="trash"></i>
  </a>
</td>

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

