1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- @extends('app.my-account.layout-lite')
- @section('page')
- <div class="px-3">
- <div class="px-3 d-flex align-items-baseline border-bottom py-2 mb-3 m-neg-3 bg-light">
- <h2 class="font-size-16 text-secondary fw-bold m-0">Dashboard</h2>
- </div>
- <div class="row">
- <div class="col-lg-6">
- <h2 class="font-size-14 fw-bold mb-2">Overall Stats</h2>
- <table class="table table-sm table-bordered dashboard-stats-table mb-4">
- <tbody>
- <tr>
- <?php $c = \App\Models\User::count(); ?>
- <th class="px-2 bg-light fw-bold text-nowrap min-width-70px">
- {{ $c }}
- </th>
- <th class="pl-2 w-100">
- <a href="{{route('admin.users')}}">Client{{$c === 1 ? '' : 's'}}</a>
- </th>
- </tr>
- <tr>
- <?php $c = \App\Models\StoreOrder::count(); ?>
- <th class="px-2 bg-light fw-bold text-nowrap">{{$c}}</th>
- <th class="pl-2">
- <a href="{{route('admin.orders')}}">Order{{$c === 1 ? '' : 's'}}</a>
- </th>
- </tr>
- <tr>
- <th class="px-2 bg-light fw-bold text-nowrap">{{displayAmount('$', $ordersTotal)}}</th>
- <th class="pl-2">
- <a href="{{route('admin.orders')}}">Order Value</a>
- </th>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="col-lg-6">
- <h2 class="font-size-14 fw-bold mb-2">Action Pending</h2>
- <table class="table table-sm table-bordered dashboard-stats-table">
- <tbody>
- <tr>
- <?php
- $c = \App\Models\User::whereHas('storeOrdersAsClient', function($qry){
- return $qry->whereRaw('(store_order.id NOT IN (SELECT financial_transaction.order_id FROM financial_transaction))');
- })->orderBy('created_at', 'DESC')->paginate(30);
- ?>
- <th class="px-2 bg-light fw-bold text-nowrap min-width-70px">
- {{ $c->total() }}
- </th>
- <th class="pl-2 w-100">
- <a href="{{route('admin.report', 'new-orders-pending-processing')}}">Users With New order{{$c === 1 ? '' : 's'}} pending processing</a>
- </th>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- @endsection
|