@extends('admin.layouts')
@section('title', 'Delivered Orders')
@section('header')

<!-- DataTable CSS -->
<link rel="stylesheet" type="text/css" href="{{asset('/assets')}}/css/datatable/dataTables.bootstrap5.min.css">
<link rel="stylesheet" type="text/css" href="{{asset('/assets')}}/css/datatable/responsive.bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{asset('/assets')}}/css/datatable/buttons.dataTables.min.css">

<!-- Page CSS -->
<link rel="stylesheet" type="text/css" href="{{asset('/assets')}}/css/formILY.css">

@endsection
@section('content')



<div class="container-fluid page-wrapper">

   <div class="row">
        <div class="d-flex justify-content-between align-items-center">
            <h3 class="page-top-heading">Delivered Orders</h3>
        </div>
    </div>

       <!-- Table Row -->
       <div class="row mt-4">
            <div class="col-lg-12">
                <div class="card datatable-card">
                    <div class="card-body">
                    <table id="data-table" class="table nowrap align-middle" style="width:100%">
                            <thead>
                                <tr>
                                    <th>S/N</th>
                                    <th>ORDER DATE</th>
                                    <th>USER DETAILS</th>
                                    <th>CATEGORY</th>
                                    <th>PRODUCT DETAILS</th>
                                    <th>AMOUNT</th>
                                    <th>ADDRESS</th>
                                    <th>INSTRUCTION</th>
                                    <th>STATUS</th>
                                </tr>
                            </thead>
                           
                            <tbody>
                                @foreach ($recent_orders as $recent_order)
                                    <tr>

                                        <td>{{ $loop->iteration }}</td>
                                        {{-- <td>{{ $recent_order->order_date }}</td> --}}
                                        <td>{{ \Carbon\Carbon::parse($recent_order->order_date)->format('d-m-Y') }}</td>
                                        <td>
                                            <div>{{ $recent_order->user_name }}</div>
                                                {{-- <div>{{ $recent_order->user->phone_number }}</div> --}}
                                        </td>
                                        <td>
                                            <div><b
                                                    class="pe-1 text-muted">Category:</b><span>{{ $recent_order->category_name }}</span>
                                            </div>
                                            <div><b class="pe-1 text-muted">Sub Category:</b><span></span></span></div>
                                        </td>
                                        <td class="custom-td">{{ $recent_order->product_details_name }}</td>
                                        <td><span>{{ $recent_order->amount }}</span></td>
                                        <td class="custom-td">{{ $recent_order->delivery_address }}</td>
                                        <td class="custom-td">{{ $recent_order->instruction }}</td>
                                      
                                      
                                        <td>
                                            <span class="badge success-badge">Delivered</span>
                                        </td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
        </div>
        <!-- Table Row Ends -->


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




@endsection
@section('footer')


<!-- JQuery CDN -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

<!-- Datatable JS -->
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/datatables.init.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/buttons.html5.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/buttons.print.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/jszip.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/pdfmake.min.js"></script>
<script type="text/javascript" src="{{asset('/assets')}}/js/datatable/vfs_fonts.js"></script>



@endsection


