<div class="content-header">
   <div class="container-fluid">
      <div class="row mb-2">
         <div class="col-sm-6">
            <h1 class="m-0 text-dark">Schedule Trip  Info
            </h1>
         </div>
         <!-- /.col -->
         <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
               <li class="breadcrumb-item"><a href="<?= base_url(); ?>/dashboard">Dashboard</a></li>
               <li class="breadcrumb-item active">Schedule Trip  Info</li>
            </ol>
         </div>
      </div>
   </div>
</div>
<section class="content">
   <div class="container-fluid">
      <div class="card">
         <div class="card-body p-0">
            <div class="table-responsive">
               <table id="custtbl" class="table card-table table-vcenter text-nowrap">
                  <thead>
                     <tr>
                        <th>Pickup Date</th>
                        <th>Name</th>
                       
                        <th>Car Type</th>
                        <th>Pickup location</th>
                        <th>Drop off location</th>
                        <th>Price</th>
                      
                        <th>Action</th>
                       
                     </tr>
                  </thead>
                  <tbody>
                     <?php
                     if (!empty($customerlist)) {
                       
                        foreach ($customerlist as $id => $customerlists) {
                          // echo $id;
                          $id= str_replace("ledRides/","",$id);
                    
                     ?>
                           <tr>
                            <td> <?php echo convertTime($customerlists['pickupDate']); ?></td>
                              <td> <?php echo getusername($customerlists['userId']); ?></td>
                             <td><?php echo ($customerlists['carType']); ?></td> 
                             <td><?php echo ($customerlists['tripDetail']['pickUp']['address']); ?></td>

                             <td><?php echo ($customerlists['tripDetail']['destinations'][0]['address']); ?></td>
                               <td><?php echo ($customerlists['price']); ?></td>
                                 <td>
                                       
                                    <a class="icon" href="<?php echo base_url(); ?>trips/deleteSchudele/<?php echo output($id); ?>">
                                       <button class="btn btn-danger btn-block mt-2" >Delete</button>
                                    </a>
                                 </td>

                           </tr>

                     <?php }
                     } ?>
                  </tbody>
               </table>
            </div>
         </div>
      </div>
   </div>
</section>