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

<!--======= Order Head Section=======-->
<section id="order-list" class="order-list mt-5">
  <div class="container">
    <div class="card border-brandcolor">
      <div class="card-header card-head-brand-bg">

        <div class="section-title pt-3" data-aos="fade-up">
          <h2>My Orders</h2>
        </div>

        <div class="row">
          <div class="col-lg-4 col-md-4 col-12">
          
            <h6 class="pull-left font-weight-bold">Order Number: <?php echo e($Order->id); ?></h6>
          </div>
          <div class="col-lg-4 col-md-4 col-6">
            <h6 class="text-center">Status: <?php echo e($Order->status->title); ?></h6>
          </div>
          <div class="col-lg-4 col-md-4 col-6">
            <h6 class="pull-right">Duration: <?php echo e($Order->duration->title); ?></h6>
          </div> 
        </div>

      </div>

      <div class="card-body">
        <div class="table-responsive">
          <table id="servicelist" class="table table-borderless">
          <thead>
            <th scope="col">Product</th>
            <th scope="col">Services</th>
            <th scope="col">Quantity</th>
            <th scope="col">Amount</th>
            <th scope="col">Action</th>
          </thead>
          <tbody>
            <?php $__currentLoopData = $Order->order_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order_product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <tr><td><?php echo e($order_product->product->title); ?></td>
              <td>
              <?php $Amount=0; ?>
                <?php $__currentLoopData = $order_product->order_product_services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order_product_services): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <span class="badge badge-primary mt-2"><?php echo e($order_product_services->product_service->servicetype->title); ?></span>
                  <?php $Amount+=$order_product_services->product_service->serviceprice; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </td>
              <td><?php echo e($order_product->quantity); ?></td>
              <?php $Amount*=$order_product->quantity; ?>
              <td><?php echo e($Amount); ?></td>
              <td><form method="POST" action="<?php echo e(route('OrderProduct.destroy',$order_product->id)); ?>" Id="form-delete-<?php echo e($order_product->id); ?>">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('delete'); ?>
                            <button type="button" class="btn btn-danger"  onclick="
                            event.preventDefault();
                            if(confirm('Are you sure delete this'))
                            {
                                document.getElementById('form-delete-<?php echo e($order_product->id); ?>').submit();
                            }"><i class="fas fa-trash"></i> Delete</button></form>
                        </td>      
              </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </tbody>
          </table>
          </div>
      </div>
      <div class="card-footer card-foot-brand-bg">
      <button type="button" class="btn btn-brandcolor pull-right" data-toggle="modal" data-target="#placeorderModal">Place Order</button>
      </div>  

    </div>
  </div>
</section><!-- End Order Head Section -->



<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.homeapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\washclub\resources\views/Home/editOrder.blade.php ENDPATH**/ ?>