<div class="clearfix"></div>
  <div class="content-wrapper">
    <div class="container-fluid">
      <!-- Breadcrumb-->
     <div class="row pt-2 pb-2">
        <div class="col-sm-9">
		    <h4 class="page-title">List Orders</h4>
	   </div>
     
     </div>
    <!-- End Breadcrumb-->
      <div class="row">
			
            <div class="col-lg-12">
               <div class="card">
                    <div class="card-header">Listed Orders</div>
                    <div class="card-body">
                      <select id="changestatus" class="form-control" style="width:200px;">
                                    <option value="">Filter Orders</option>
                                    <option value="Pending">Pending</option>
                                    <option value="Under Review">Under Review</option>
                                    <option value="Order Confirmed">Order Confirmed</option>
                                    <option value="Dispatched">Dispatched</option>
                                    <option value="In Transit">In Transit</option>
                                    <option value="Delivered">Delivered</option>
                                    <option value="Dispatched">Dispatched</option>
                                    <option value="In Return">In Return</option>
                                    <option value="Return Completed">Return Completed</option>
                                    <option value="Cancelled">Cancelled</option>
                                    <option value="Completed">Completed</option>
                                </select><br/>
                      <table class="table table-condensed table-bordered">
                        <thead>
                                                            <tr>

													<th>S.No.</th>

													<th>OrderNo.</th>

                                                    <th>OrderDate</th>
                                                    <th>City/Admin</th>
													<th>Slot</th>
													<th>UserDetails</th>

                                                    <th>OrderTotal</th>

													<th>PaymentStatus</th>

													<th>Total Items</th>

													<th>Action</th>

												</tr>
                                                        </thead>
                        <tbody id="orders_ajax">
                            
                        </tbody>
                      </table>
                      <ul class="pagination">
                                
                      </ul>
                      
                    </div>
                    
               </div>                  
            </div>
            
        </div><!--End Row-->
	  
	  <!--End Row-->

    </div>
    <!-- End container-fluid-->
    
    </div><!--End content-wrapper-->
   <!--Start Back To Top Button-->
    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
    <!--End Back To Top Button-->
	
	<!--Start footer-->
	<footer class="footer">
      <div class="container">
        <div class="text-center">
          Copyright © 2020 Grocery Store
        </div>
      </div>
    </footer>
	<!--End footer-->
   
  </div><!--End wrapper-->

  <script src="<?php echo base_url();?>adminassets/plugins/bootstrap-datatable/js/jquery.dataTables.min.js"></script>
  <script src="<?php echo base_url();?>adminassets/plugins/bootstrap-datatable/js/dataTables.bootstrap4.min.js"></script>
  <script>
	$(document).ready(function(){
		<?php //if(!$this->uri->segment(3)){?>
		var ostatus=$("#changestatus").val();
		<?php //}else{?>
		//var ostatus="Pending";
		<?php //}?>
		$("#changestatus").change(function(){
			var ostatus=$("#changestatus").val();
			$.ajax({
				 type: "POST",
				 url: '<?php echo base_url();?>store/order_nav',
				 data: {ostatus:ostatus},
				 success: function(res){
					$(".pagination").html(res)
				 }
			});
		});
		
		$.ajax({
				 type: "POST",
				 url: '<?php echo base_url();?>store/order_nav',
				 data: {ostatus:ostatus},
				 success: function(res){
					$(".pagination").html(res)
				 }
		});
	});
</script>
<script src="<?php echo base_url();?>adminassets/js/sidebar-menu.js"></script>
<!-- Custom scripts -->
<script src="<?php echo base_url();?>adminassets/js/app-script.js"></script>
</body>
</html>
