<main class="main-wrapper">
    <div class="main-content">
      <!-- orders section -->
      <div class="d-flex justify-content-between flex-wrap mb-3">
      <div>
        <h3>Leave Request</h3>
      
      </div>
        <ul class="nav nav-tabs">
          <li class="nav-item my-1">
            <a class="nav-link " id="newRequest-tab"  href="<?php echo base_url().'dashboard/leaves' ?>">
             Pending</a>
          </li>
     
          <li class="nav-item my-1">
            <a class="nav-link active" id="sendInvoice-tab" href="<?php echo base_url().'dashboard/leavesapproved' ?>" >Approved</a>
          </li>
        
        </ul>
      </div>
      <div class="tab-content">
        <div class="tab-pane fade show active" id="newRequest" role="tabpanel">
            <div class="table-responsive  card px-2 my-2  ">
                <table id="example" class="table tableStriped">
                  <thead>
                    <tr>
                      <th scope="col ">
                        <p class=" mb-0 thfont">User Name</p>
                      </th>
                      <th scope="col ">
                        <p class=" mb-0 thfont">Leave Date</p>
                      </th>
                      <th scope="col ">
                        <p class=" mb-0 thfont">Reason</p>
                      </th>
  
                     
  
                   
                  

                    </tr>
                  </thead>
                  <?php 
                //   echo "<pre>";
                //   print_r($services);
                //   echo "</pre>";
                  ?>
                  
                  
                  <div class="">
                    <tbody class=" ">
                      <!-- Add table rows with data here -->
                  <?php foreach($services as $s=>$t) {?> 
                  <tr>
                    <td><?php echo getusername($t['userId']) ?></td>
                    <td><?php echo date("M d",$t['leaveDate']/1000) ?></td>
                   
                    <td><?php echo $t['reasonLeave']; ?></td>
                    
                   </tr>
                   <?php } ?>


                      <!-- Add more rows as needed -->
  
                    </tbody>
                  </div>
                </table>
              </div>
             
          </div>
         
             <div class="tab-pane fade" id="finishedRequest" role="tabpanel">
              <div class="table-responsive  card px-2 my-2  ">
                <table id="example" class="table tableStriped">
                  <thead>
                    <tr>
                      <th scope="col ">
                        <p class=" mb-0 thfont">User Name</p>
                      </th>
                      <th scope="col ">
                        <p class=" mb-0 thfont">Leave Date</p>
                      </th>
                      <th scope="col ">
                        <p class=" mb-0 thfont">Reason</p>
                      </th>

                    </tr>
                  </thead>
                  <div class="">
                    <tbody class=" ">
                      <!-- Add table rows with data here -->
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                  
                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                   

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                  

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                    
                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                 

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                   

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                  

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                  

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                  

                   </tr>
                   <tr>
                    <td>Whiskers</td>
                    <td>March 15</td>
                   
                    <td>Lorem Ipsum Is Simply Dummy Text Of The Printing & Typesetting.</td>
                   

                   </tr>
                      <!-- Add more rows as needed -->
  
                    </tbody>
                  </div>
                </table>
              </div>
            </div>
        </div>
       
       
        
      </div>


      <div>
     
      </div>

    </div>
    </div>
  </main>