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

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



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

<!-- ============================================================== -->

<!-- Start right Content here -->

<!-- ============================================================== -->


<div class="content-page">

    <!-- Start content -->

    <div class="content">

        <div class="container-fluid">

          <div class="row">

              <div class="col-sm-12">

                  <div class="page-title-box">

                      <div class="row align-items-center">

                          <div class="col-md-8">

                              <h4 class="page-title mb-0">Order</h4>

                              <ol class="breadcrumb m-0">

                                  <li class="breadcrumb-item"><a href="#">Dashboard</a></li>

                                  <li class="breadcrumb-item active" aria-current="page">Order</li>

                              </ol>

                          </div>

                          <div class="col-md-4">

                              <div class="float-right d-none d-md-block">

                                  <div class="dropdown">





                                  </div>

                              </div>

                          </div>

                      </div>



                  </div>

              </div>

          </div>

          <!-- end row -->

            <div class="row">

                <div class="col-lg-12">

                    <div class="card">

                        <div class="card-body">

                          <div class="row">
                            <div class="col-md-12">
                              <?php if($order->status == 0): ?>
                              <a href="<?php echo e(route('admin.changestatus' , [$order->id , '1'])); ?>" class="btn btn-success pull-right"> Mark as Inprocess</a>
                              <?php endif; ?>

                              <?php if($order->status == 1): ?>
                              <a href="<?php echo e(route('admin.changestatus' , [$order->id , '2'])); ?>" class="btn btn-success pull-right"> Mark as Delivered</a>
                              <?php endif; ?>
                            </div>
                            <div class="col-md-12">
                              <h5>Person Details</h5>

                            <table class="table">
                              <tr>
                                <th>Name</th>
                                <td><?php echo e($order->name); ?></td>
                                <th>Contact</th>
                                <td><?php echo e($order->contact); ?></td>
                              </tr>

                              <tr>
                                <th>Email</th>
                                <td><?php echo e($order->email); ?></td>
                                <th>Address</th>
                                <td><?php echo e($order->address); ?></td>
                              </tr>

                              <tr>
                                <th>Order #</th>
                                <td><?php echo e($order->order_no); ?></td>
                                <th>Total Amount</th>
                                <td><?php echo e($order->amount); ?></td>
                              </tr>

                              <tr>
                                <th>Payment Type</th>
                                <td><?php echo e($order->payment); ?></td>
                                <th>Notes</th>
                                <td><?php echo e($order->notes); ?></td>
                              </tr>

                              <tr>
                                <th>Status</th>
                                <td><?php if($order->status == 0 ): ?> Pending/New
                                <?php elseif($order->status == 1): ?> Inprocess
                              <?php else: ?> Delivered <?php endif; ?></td>
                              <th>Order Date</th>
                              <td><?php echo e($order->created_at); ?></td>
                              </tr>

                            </table>
                            </div>



                          </div>

                          <hr style="width:100%">

                          <div class="row">

                            <div class="col-md-12">
                              <h5>Item Details</h5>
                              <table class="table">
                                <thead>
                                  <tr>
                                  <th>Product</th>
                                  <th>Vendor</th>
                                  <th>Menu </th>
                                  <th>Quantity</th>
                                  <th>Price</th>
                                  </tr>
                                </thead>

                                <tbody>
                                  <?php $__currentLoopData = $order->orderitems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                  <tr>
                                    <td><?php echo e($items->product->name); ?></td>
                                    <td><?php if($items->product->brand): ?><?php echo e($items->product->brand->name); ?><?php endif; ?></td>
                                    <td> <?php echo e($items->product->menu->name); ?> </td>
                                    <td><?php echo e($items->qty); ?></td>
                                    <td><?php echo e($items->amount); ?></td>
                                  </tr>
                                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                              </table>
                            </div>


                          </div>

                        </div>

                    </div>

                </div>

            </div>

            <!-- end row -->


        </div> <!-- container-fluid -->



    </div> <!-- content -->



    <footer class="footer">

        © 2020 - 2021  Mommy Kloset

    </footer>

</div>





<!-- ============================================================== -->

<!-- End Right content here -->

<!-- ============================================================== -->

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



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


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

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\freelance\hemp\resources\views/admin/showorder.blade.php ENDPATH**/ ?>