orders.blade.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. @extends('app.my-account.admin.users.single')
  2. @section('details')
  3. <div class="my-4">
  4. <div class="d-flex align-items-center justify-content-between">
  5. <h4 class="m-0"><b>Orders as Client</b></h4>
  6. <div>
  7. @include('app.my-account.admin.orders.forms.create-order')
  8. </div>
  9. </div>
  10. <div class="table-responsive">
  11. <table class="table table-sm table-hover table-striped table-bordered mb-0">
  12. <thead>
  13. <tr>
  14. <th>IID</th>
  15. <th>Created At</th>
  16. <th>Total Amount</th>
  17. <th>Tests</th>
  18. <th>Trx</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. @foreach ($orders as $order)
  23. <tr @if ($order->is_cancelled) class="cancelled-order" @endif>
  24. <td><a href="{{ route('admin.orders.view.dashboard', $order) }}">{{ $order->orderNumber() }}</a>
  25. </td>
  26. <td>{{ friendly_date($order->created_at) }}</td>
  27. <td>{{ displayAmount('$', $order->total()) }}</td>
  28. <td>
  29. @include('app.my-account.admin.orders.partials.order-tests-summary')
  30. </td>
  31. <td>
  32. <div>
  33. @include('app.my-account.admin.orders.forms.create-charge')
  34. </div>
  35. <div>
  36. <table class="table table-sm table-hover table-striped table-bordered mb-0">
  37. <thead>
  38. <tr>
  39. <th>Date</th>
  40. <th>Charge/Refund</th>
  41. <th>Amount</th>
  42. <th>Payment Method</th>
  43. <th></th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. @foreach ($order->financialTransactions as $transaction)
  48. <tr>
  49. <td>{{ friendly_date($transaction->created_at) }}</td>
  50. <td>{{ $transaction->charge_or_refund }}</td>
  51. <td>${{ $transaction->amount }}</td>
  52. <td>{!! $transaction->paymentMethod->displayName() !!}</td>
  53. <td>
  54. @if ($transaction->charge_or_refund == 'CHARGE')
  55. @include('app.my-account.admin.orders.forms.create-refund')
  56. @endif
  57. </td>
  58. </tr>
  59. @endforeach
  60. </tbody>
  61. </table>
  62. </div>
  63. </td>
  64. </tr>
  65. @endforeach
  66. @if(!count($orders))
  67. <tr>
  68. <td colspan="5">No orders placed!</td>
  69. </tr>
  70. @endif
  71. </tbody>
  72. </table>
  73. </div>
  74. </div>
  75. <div class="mt-3">
  76. {{ $orders->appends(request()->input())->links() }}
  77. </div>
  78. @endsection