                    



<?php $__env->startSection('content'); ?>


<div class="container-fluid mt-5">

                    
            <div class="row">

                        <div class="col-12">
                            <div class="card shadow recent-sales">
              
                              <div class="card-body">
                                <h5 class="card-title text-center mb-3">Order Details</h5>
              
                                <table class="table table-borderless datatable dataTable-table text-center">
                                      <tr>
                                        <td>Order Id</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->order_no); ?></td>
                                      </tr>
                                      <tr>
                                        <td>Transaction Id</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->transaction); ?></td>
                                      </tr>
                                      <tr>
                                        <tr>
                                        <td>Customer Name</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->user->name); ?></td>
                                      </tr>
                                      <tr>
                                        <td>No. of Items</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->items); ?></td>
                                      </tr>
                                      <tr>
                                        <td>Total Amount</td>
                                        <td></td>
                                        <td>-</td>
                                        <td>Rs.<?php echo e($order->amount); ?></td>
                                      </tr>
                                        <td>Payment Status</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e(!empty($order->status)? $order->status : ""); ?></td>
                                      </tr>
                                      <tr>
                                        <td>Order Status</td>
                                        <td></td>
                                        <td>-</td>
                                        
                                        <?php if($order->order_status == '0'): ?>
                                           <td><span class="badge text-secondary mt-2">Pending</span></td>
                                        <?php endif; ?>
                                        <?php if($order->order_status == '1'): ?>
                                           <td><span class="badge text-success mt-2">Confirmed</span></td>
                                        <?php endif; ?>
                                        <?php if($order->order_status == '9'): ?>
                                           <td><span class="badge text-danger mt-2">Rejected</span></td>
                                        <?php endif; ?>
                                        <?php if($order->order_status == '2'): ?>
                                           <td><span class="badge text-primary mt-2">Dispatched</span></td>
                                        <?php endif; ?>
                                      </tr>
                                    </table>
                  
                                
                                <div class="dataTable-container">

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




<?php if($type == "item"): ?>
                    <div class="row mt-3">

                        <div class="col-12">
                            <div class="card shadow recent-sales">
              
                              <div class="card-body">
                                <h5 class="card-title text-center">List of Items</h5>
              
                                
                                
                                <div class="dataTable-container">
                                <div class="table-responsive">  
                                <table class="table table-bordered datatable dataTable-table" id="example">
                                  <thead>
                                    <tr>
                                    <th scope="col" style="width: 2%;"><a href="#">Sno.</a></th>
                                    <th scope="col" style="width: 5%;"><a href="#">image</a></th>
                                    <th scope="col" style="width: 10%;"><a href="#">Name</a></th>
                                    <th scope="col" style="width: 5%;"><a href="#">Quantity</a></th>
                                    <th scope="col" style="width: 5%;"><a href="#">Price</a></th>                  
                                    
                                    </tr>
                                  </thead>

                                  <tbody>
                                    <?php if(!empty($orderitems)): ?>
                                       <?php $__currentLoopData = $orderitems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                          <tr>
                                          <th scope="row"><?php echo e($loop->iteration); ?></th>
                                          <td><img class="img-fluid" src="<?php echo e(asset('images/package') . '/' . $item->image); ?>" width="30%" height="10%"></td>
                                          <td><p><?php echo e($item->name); ?></p></td>
                                          <td><p><?php echo e($item->qty); ?></p></td>
                                          <td><p>Rs.<?php echo e($item->price); ?></p></td>                                 
                                          </tr> 
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>   
                                    <?php else: ?>
                                        <h3>No Items Found</h3>
                                    <?php endif; ?>
                                  </tbody>                                        
                                </table>
                                </div>
                                </div>
                                
                               </div>
              
                              </div>
              
                            </div>
                    </div>
  <?php endif; ?>

  <?php if($type == "upload"): ?>
    <div class="card shadow mb-2">
        <div class="m-3">

              <div class="text-center">
                      <h1 class="h3 mb-0 text-gray-800">Images and Video</h1>
              </div>


              <div class="table-responsive">
                <table class="table table-sm table-nowrap card-table">
                  <thead>
                    <tr>
                      <th>

                        <!-- Checkbox -->
                        <div class="form-check">
                          <input class="" name="ordersSelect" id="ordersSelectAll" type="checkbox">
                          <label class="form-check-label" for="ordersSelectAll">&nbsp;</label>
                        </div>

                      </th>
                      <th>
                        <a href="#" class="text-muted list-sort" data-sort="orders-product">
                           Images and Video
                        </a>
                      </th>
                      <th>
                        <a href="#" class="text-muted list-sort" data-sort="orders-product">
                          Action
                        </a>
                      </th>
                    </tr>
                  </thead>
                  <tbody class="list"> 
                    
                    <?php if(!empty($order->image1)): ?>
                      <tr>
                        <td>
                          <!-- Checkbox -->
                          <div class="form-check">
                            <input class="" type="checkbox" name="ordersSelect" id="ordersSelectOne">
                            <label class="form-check-label" for="ordersSelectOne">&nbsp;</label>
                          </div>
                        </td>
                        <td class="orders-order">
                          <img id="image1" src="/images/supplier/<?php echo e(!empty($order->image1) ? $order->image1 : 'undraw_profile.svg'); ?>" alt="your image" width="22%" height="100%"/>
                        </td>
                        <td class="orders-order">
                            <a href="/delete-order-photo/<?php echo e($order->id); ?>/img1" class="btn-blu-login">Delete</a>
                        </td>
                      </tr>
                    <?php endif; ?>

                    <?php if(!empty($order->image2)): ?>
                      <tr>
                        <td>
                          <!-- Checkbox -->
                          <div class="form-check">
                            <input class="" type="checkbox" name="ordersSelect" id="ordersSelectOne">
                            <label class="form-check-label" for="ordersSelectOne">&nbsp;</label>
                          </div>
                        </td>
                        <td class="orders-order">
                          <img id="image1" src="/images/supplier/<?php echo e(!empty($order->image2) ? $order->image2 : 'undraw_profile.svg'); ?>" alt="your image" width="22%" height="100%"/>
                        </td>
                        <td class="orders-order">
                            <a href="/delete-order-photo/<?php echo e($order->id); ?>/img2" class="btn-blu-login">Delete</a>
                        </td>
                      </tr>
                    <?php endif; ?>

                    <?php if(!empty($order->image3)): ?>
                      <tr>
                        <td>
                          <!-- Checkbox -->
                          <div class="form-check">
                            <input class="" type="checkbox" name="ordersSelect" id="ordersSelectOne">
                            <label class="form-check-label" for="ordersSelectOne">&nbsp;</label>
                          </div>
                        </td>
                        <td class="orders-order">
                          <img id="image1" src="/images/supplier/<?php echo e(!empty($order->image3) ? $order->image3 : 'undraw_profile.svg'); ?>" alt="your image" width="22%" height="100%"/>
                        </td>
                        <td class="orders-order">
                            <a href="/delete-order-photo/<?php echo e($order->id); ?>/img3" class="btn-blu-login">Delete</a>
                        </td>
                      </tr>
                    <?php endif; ?>

                    <?php if(!empty($order->image4)): ?>
                      <tr>
                        <td>
                          <!-- Checkbox -->
                          <div class="form-check">
                            <input class="" type="checkbox" name="ordersSelect" id="ordersSelectOne">
                            <label class="form-check-label" for="ordersSelectOne">&nbsp;</label>
                          </div>
                        </td>
                        <td class="orders-order">
                          <img id="image1" src="/images/package/<?php echo e(!empty($order->image4) ? $order->image4 : 'undraw_profile.svg'); ?>" alt="your image" width="22%" height="100%"/>
                        </td>
                        <td class="orders-order">
                            <a href="/delete-order-photo/<?php echo e($order->id); ?>/img4" class="btn-blu-login">Delete</a>
                        </td>
                      </tr>
                    <?php endif; ?>

                    <?php if(!empty($order->video)): ?>
                      <tr>
                        <td>
                          <!-- Checkbox -->
                          <div class="form-check">
                            <input class="" type="checkbox" name="ordersSelect" id="ordersSelectOne">
                            <label class="form-check-label" for="ordersSelectOne">&nbsp;</label>
                          </div>
                        </td>
                        <td class="orders-order">
                            <video width="320" height="240" controls>
                            <source src="/images/supplier/<?php echo e($order->video); ?>" type="video/mp4">
                            </video>
                        </td>
                        <td class="orders-order">
                            <a href="/delete-order-photo/<?php echo e($order->id); ?>/vid" class="btn-blu-login">Delete</a>
                        </td>
                      </tr>
                    <?php endif; ?>
                    
                  </tbody>
                </table>
              </div>                         

           </div>
    </div>
                    
  <?php endif; ?>

  <?php if($type == "dispatch"): ?>

  <div class="row">
      <div class="col-12">
         <div class="card shadow recent-sales">
                   <div class="card-body">
                                <h5 class="card-title text-center mb-3">Delivery Details</h5>
              
                                <table class="table table-bordered datatable dataTable-table text-center">
                                      <tr>
                                        <td>Name</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->del_name); ?></td>
                                      </tr>
                                      <tr>
                                        <td>AGE</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->del_age); ?></td>
                                      </tr>
                                      <tr>
                                        <td>Contact Number</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->del_phone); ?></td>
                                      </tr>
                                      <?php if(!empty($order->del_info)): ?>
                                      <tr>
                                        <td>Information</td>
                                        <td></td>
                                        <td>-</td>
                                        <td><?php echo e($order->del_info); ?></td>
                                      </tr>
                                      <?php endif; ?>
                                    </table>
                  
                                 <div class="text-center mt-2">
                                                      <button type="button" class="btn btn-success">Order Dispatched</button>
                                  </div>
                                
                                
                               </div>

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

   <?php endif; ?>
                    

                </div>

<?php $__env->stopSection(); ?>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script>


  function image_upload(){
      const fileInput = document.getElementById('image');
      var files = [...fileInput.files];
      var i = 0;
      for (const f of files) { 
        document.getElementById('blah'+i).classList.remove('d-none');
        document.getElementById('icon'+i).classList.remove('d-none');
         document.getElementById('blah'+i).src = URL.createObjectURL(f);

         i++;
      }
      
}

 function video_upload(){
      const fileInput = document.getElementById('video');
      var files = [...fileInput.files];
      var i = 0;
      for (const f of files) { 
        document.getElementById('blah'+i).classList.remove('d-none');
        document.getElementById('icon'+i).classList.remove('d-none');
         document.getElementById('blah'+i).src = URL.createObjectURL(f);

         i++;
      }
      
}



  function icon_click0(){
  const fileInput = document.getElementById('image');
  console.log(fileInput)
      var files = [...fileInput.files];
      console.log(files);
            files.splice(0, 1);
        document.getElementById('blah0').classList.add('d-none');
        document.getElementById('icon0').classList.add('d-none');
}

function icon_click1(){
  const fileInput = document.getElementById('image');
  console.log(fileInput)
      var files = [...fileInput.files];
      console.log(files);
            files.splice(1, 1);
        document.getElementById('blah1').classList.add('d-none');
        document.getElementById('icon1').classList.add('d-none');
}

function icon_click2(){
  const fileInput = document.getElementById('image');
  console.log(fileInput)
      var files = [...fileInput.files];
      console.log(files);
            files.splice(2, 1);
        document.getElementById('blah2').classList.add('d-none');
        document.getElementById('icon2').classList.add('d-none');

}

function icon_click3(){
  const fileInput = document.getElementById('image');
  console.log(fileInput)
      var files = [...fileInput.files];
      console.log(files);
            files.splice(2, 1);
        document.getElementById('blah3').classList.add('d-none');
        document.getElementById('icon3').classList.add('d-none');

}

</script>
<?php echo $__env->make('admin.layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/603031.cloudwaysapps.com/pvusfnxuud/public_html/suymedia/resources/views/admin/order-detail.blade.php ENDPATH**/ ?>