@extends('layouts.admin')



@section('styles')

@endsection



@section('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">Orders</h4>

                              <ol class="breadcrumb m-0">

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

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

                              </ol>

                          </div>

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

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







                              </div>

                          </div>

                      </div>



                  </div>

              </div>

          </div>

          <!-- end row -->

            <div class="row">

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

                    <div class="card">

                        <div class="card-body">

                            <h4 class="mt-0 header-title">Orders</h4>

                            <div class="table-responsive mt-4">

                                <table class="table  table-striped table-hover mb-0">

                                    <thead>
                                        <tr>
                                            <th scope="col">(#)</th>
                                            <th scope="col">Name</th>
                                            <th scope="col">Contact</th>
                                            <th scope="col">Email</th>
                                            <th scope="col">Address</th>
                                            <th scope="col">Order #</th>
                                            <th scope="col">Total Amount</th>
                                            <th scope="col">Payment</th>
                                            <th scope="col">Status</th>
                                            <th scope="col">Date</th>
                                            <th scope="col" colspan="2">Actions</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                      @foreach($orders as $order)
										  <tr>
										  <td>{{$loop->iteration}}</td>
											<td>{{$order->name}}</td>
                      <td>{{$order->contact}}</td>
                      <td>{{$order->email}}</td>
                      <td>{{$order->address}}</td>
                      <td>{{$order->order_no}}</td>
                      <td>{{$order->amount}}</td>
                      <td>{{$order->payment}}</td>
                      <td>@if($order->status == 0 ) Pending/New
                      @elseif($order->status == 1) Inprocess
                    @else Delivered @endif</td>
                    <td>{{$order->created_at}}</td>
											<td>
                        <a href="{{ route('admin.orderdetails' , $order->id)}}"   class="btn btn-warning btn-sm" ><i class="fa fa-eye text-white"></i></a>
                      </td>
										</tr>
                    @endforeach







                                    </tbody>
                                </table>
                            </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 -->

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

@endsection



@section('scripts')

@endsection
