dashboard.blade.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @extends('app.my-account.layout-lite')
  2. @section('page')
  3. <div class="px-3">
  4. <div class="px-3 d-flex align-items-baseline border-bottom py-2 mb-3 m-neg-3 bg-light">
  5. <h2 class="font-size-16 text-secondary fw-bold m-0">Dashboard</h2>
  6. </div>
  7. <div class="row">
  8. <div class="col-lg-6">
  9. <h2 class="font-size-14 fw-bold mb-2">Overall Stats</h2>
  10. <table class="table table-sm table-bordered dashboard-stats-table mb-4">
  11. <tbody>
  12. <tr>
  13. <?php $c = \App\Models\User::count(); ?>
  14. <th class="px-2 bg-light fw-bold text-nowrap min-width-70px">
  15. {{ $c }}
  16. </th>
  17. <th class="pl-2 w-100">
  18. Client{{$c === 1 ? '' : 's'}}
  19. </th>
  20. </tr>
  21. <tr>
  22. <?php $c = \App\Models\StoreOrder::count(); ?>
  23. <th class="px-2 bg-light fw-bold text-nowrap">{{$c}}</th>
  24. <th class="pl-2">
  25. Order{{$c === 1 ? '' : 's'}}
  26. </th>
  27. </tr>
  28. <tr>
  29. <th class="px-2 bg-light fw-bold text-nowrap">{{displayAmount('$', $ordersTotal)}}</th>
  30. <th class="pl-2">
  31. Order Value
  32. </th>
  33. </tr>
  34. </tbody>
  35. </table>
  36. <h2 class="font-size-14 fw-bold mb-2">Action Pending</h2>
  37. <table class="table table-sm table-bordered dashboard-stats-table">
  38. <tbody>
  39. <tr>
  40. <?php $c = \App\Models\User::whereRaw("(app_user.id NOT IN (SELECT user_id FROM store_order))")->count(); ?>
  41. <th class="px-2 bg-light fw-bold text-nowrap min-width-70px">
  42. {{ $c }}
  43. </th>
  44. <th class="pl-2 w-100">
  45. <a href="{{route('admin.report', 'new-orders-pending-processing')}}">New order{{$c === 1 ? '' : 's'}} pending processing</a>
  46. </th>
  47. </tr>
  48. </tbody>
  49. </table>
  50. </div>
  51. </div>
  52. </div>
  53. @endsection