![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/resources/views/driver/orders/ |
@extends('layouts.front.app_driver') @section('content') @include('layouts.front.other-menu') <div class="main-content-350"> <section class="container content"> <div class="row"> <div class="col-md-12"> @include('layouts.errors-and-messages') <div class="box"> <div class="box-body"> <div> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" @if(request()->input('tab') == 'pending-orders') class="active" @endif><a href="#pending-orders" aria-controls="pending-orders" role="tab" data-toggle="tab">Pending Orders</a></li> <li role="presentation" @if(request()->input('tab') == 'completed-orders') class="active" @endif><a href="#completed-orders" aria-controls="completed-orders" role="tab" data-toggle="tab">Completed Orders</a></li> <li role="presentation" @if(request()->input('tab') == 'products') class="active" @endif><a href="#products" aria-controls="products" role="tab" data-toggle="tab">Products</a></li> </ul> <div class="tab-content customer-order-list"> <div role="tabpanel" class="tab-pane @if(request()->input('tab') == 'pending-orders')active @endif table-responsive-md" id="pending-orders"> <h3 class="bold margin-top-30">Pending Orders</h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="pending_order_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-mobile-l">Customer</th> <th scope="col" class="min-mobile-l">Town</th> <th scope="col" class="min-tablet-l">Eircode</th> <th scope="col" class="min-tablet-l">Status</th> </tr> </thead> <tbody> @if(count($orders) > 0) @foreach($orders as $order) <tr> <td class="dtr-control"><a href="{{ route('driver.order.show', [$order->id]) }}">{{$order->id}}</a></td> <td><a href="{{ route('driver.order.show', [$order->id]) }}">{{$order->name}}</a></td> <td>@if(!empty($order->town)) <a href="{{ route('driver.order.show', [$order->id]) }}">{{$order->town}}</a> @endif</td> <td><a href="{{ route('driver.order.show', [$order->id]) }}">{{ $order->zip }}</a></td> <td><span class='badge font-badge @if ($order->order_status_name == "paid") badge-success @elseif($order->order_status_name == "awaiting payment") badge-awaiting @elseif($order->order_status_name == "pending") badge-warning @else badge-danger @endif'>{{ $order->order_status_name }}</span></td> </tr> @endforeach @else <tr><td class="dtr-control" colspan="5" style="text-align:center">No Pending Orders</td></tr> @endif </tbody> </table> </div> <div role="tabpanel" class="tab-pane @if(request()->input('tab') == 'completed-orders')active @endif table-responsive-md" id="completed-orders"> <h3 class="bold margin-top-30">Completed / Cancelled Orders</h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="order_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-mobile-l">Customer</th> <th scope="col" class="min-mobile-l">Town</th> <th scope="col" class="min-tablet-l">Eircode</th> <th scope="col" class="min-tablet-l">Status</th> </tr> </thead> <tbody> @foreach($completed_orders as $order) <tr> <td class="dtr-control"><a href="{{ route('driver.order.show', [$order->id]) }}">{{ $order->id }}</a></td> <td><a href="{{ route('driver.order.show', [$order->id]) }}">{{$order->name}}</a></td> <td>@if(!empty($order->town)) <a href="{{ route('driver.order.show', [$order->id]) }}">{{$order->town}}</a> @endif</td> <td><a href="{{ route('driver.order.show', [$order->id]) }}">{{ $order->zip }}</a></td> <td><span class='badge font-badge @if ($order->order_status_name == "paid") badge-success @elseif($order->order_status_name == "awaiting payment") badge-awaiting @elseif($order->order_status_name == "pending") badge-warning @else badge-danger @endif'>{{ $order->order_status_name }}</span></td> </tr> @endforeach </tbody> </table> </div> <div role="tabpanel" class="tab-pane @if(request()->input('tab') == 'products')active @endif table-responsive-md" id="products"> <h3 class="bold margin-top-30">Products</h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="order_table"> <thead class="thead-dark"> <tr> <th scope="col" class="min-tablet-l">Product</th> <th scope="col" class="min-mobile-l">Quantity</th> <th scope="col" class="min-mobile-l">Orders</th> </tr> </thead> <tbody> @if(count($produc_order_details) > 0) @foreach($produc_order_details as $key=>$value) <tr> <td class="dtr-control"> @if(isset($value['cover'])) <img src="{{ URL::asset('/public/storage/'.$value['cover']) }}" style="height: 15px;width: 15px; margin-right:5px" /> @else <img src="{{ url('/images/default.jpg') }}" style="height: 15px;width: 15px; margin-right:5px" /> @endif {{isset($value['name']) ? $value['name'] : ''}}</td> <td>{{isset($value['total_quantity']) ? $value['total_quantity'] : 0}}</td> <td>{{isset($value['total_orders']) ? $value['total_orders'] : 0}}</td> </tr> @endforeach @endif </tbody> </table> </div> </div> </div> </div> <div class="box-footer"></div> </div> </div> </div> </section> </div> @endsection @section('js') <script type="text/javascript"> $(document).ready( function () { $.fn.DataTable.ext.pager.numbers_length = 5; var mobileResize = function(){ var width = $(window).width(); if (width < 440) { $(".dataTables_length").hide(); $('#pending_order_table').DataTable({ "destroy": true, "responsive": true, "order": [[ 0, "desc" ]], "bPaginate": true, "bLengthChange": false, "bFilter": true, "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' } }); $('#order_table').DataTable({ "destroy": true, "responsive": true, "order": [[ 0, "desc" ]], "bPaginate": true, "bLengthChange": false, "bFilter": true, "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' } }); } else { $(".dataTables_length").show(); $('#pending_order_table').DataTable({ "destroy": true, "responsive": true, "order": [[ 0, "desc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' } }); $('#order_table').DataTable({ "destroy": true, "responsive": true, "order": [[ 0, "desc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' } }); } }; $(window).resize(mobileResize); $(mobileResize); }); </script> @endsection