index.blade.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @extends('layouts.main')
  2. @section('content')
  3. <!-- CONTENT HEADER -->
  4. <section class="content-header">
  5. <div class="container-fluid">
  6. <div class="row mb-2">
  7. <div class="col-sm-6">
  8. <h1>{{__('Payments')}}</h1>
  9. </div>
  10. <div class="col-sm-6">
  11. <ol class="breadcrumb float-sm-right">
  12. <li class="breadcrumb-item"><a href="{{route('home')}}">Dashboard</a></li>
  13. <li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.payments.index')}}">{{__('Payments')}}</a>
  14. </li>
  15. </ol>
  16. </div>
  17. </div>
  18. </div>
  19. </section>
  20. <!-- END CONTENT HEADER -->
  21. <!-- MAIN CONTENT -->
  22. <section class="content">
  23. <div class="container-fluid">
  24. <div class="card">
  25. <div class="card-header">
  26. <h5 class="card-title"><i class="fas fa-money-bill-wave mr-2"></i>{{ __('Payments') }}</h5>
  27. <div class="float-right">
  28. <a href="{{ route('admin.invoices.downloadAllInvoices') }}"><button
  29. class="btn btn-info">{{ __('Download all Invoices') }}</button></a>
  30. </div>
  31. </div>
  32. <div class="card-body table-responsive">
  33. <table id="datatable" class="table table-striped">
  34. <thead>
  35. <tr>
  36. <th>{{ __('ID') }}</th>
  37. <th>{{ __('Type') }}</th>
  38. <th>{{ __('User') }}</th>
  39. <th>{{ __('Amount') }}</th>
  40. <th>{{ __('Product Price') }}</th>
  41. <th>{{ __('Tax Value') }}</th>
  42. <th>{{ __('Tax Percentage') }}</th>
  43. <th>{{ __('Total Price') }}</th>
  44. <th>{{ __('Payment ID') }}</th>
  45. <th>{{ __('Payment Method') }}</th>
  46. <th>{{ __('Status') }}</th>
  47. <th>{{ __('Created at') }}</th>
  48. <th></th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. </tbody>
  53. </table>
  54. </div>
  55. </div>
  56. </div>
  57. <!-- END CUSTOM CONTENT -->
  58. </div>
  59. </section>
  60. <!-- END CONTENT -->
  61. <script>
  62. document.addEventListener("DOMContentLoaded", function() {
  63. $('#datatable').DataTable({
  64. language: {
  65. url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{ $locale_datatables }}.json'
  66. },
  67. processing: true,
  68. serverSide: true,
  69. stateSave: true,
  70. ajax: "{{ route('admin.payments.datatable') }}",
  71. order: [[ 10, "desc" ]],
  72. columns: [
  73. {data: 'id',name: 'payments.id'},
  74. {data: 'type'},
  75. {data: 'user'},
  76. {data: 'amount'},
  77. {data: 'price'},
  78. {data: 'tax_value'},
  79. {data: 'tax_percent'},
  80. {data: 'total_price'},
  81. {data: 'payment_id'},
  82. {data: 'payment_method'},
  83. {data: 'status'},
  84. {data: 'created_at', type: 'num', render: {_: 'display', sort: 'raw'}},
  85. {data: 'actions' , sortable : false},
  86. ],
  87. fnDrawCallback: function(oSettings) {
  88. $('[data-toggle="popover"]').popover();
  89. },
  90. });
  91. });
  92. </script>
  93. @endsection