affiliate_withdraw_requests.blade.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <div class="card">
  4. <div class="card-header">
  5. <h5 class="mb-0 h6">{{translate('Affiliate Withdraw Request')}}</h5>
  6. </div>
  7. <div class="card-body">
  8. <table class="table aiz-table mb-0">
  9. <thead>
  10. <tr>
  11. <th>#</th>
  12. <th data-breakpoints="lg">{{translate('Date')}}</th>
  13. <th>{{translate('Name')}}</th>
  14. <th data-breakpoints="lg">{{translate('Email')}}</th>
  15. <th>{{translate('Amount')}}</th>
  16. <th data-breakpoints="lg">{{translate('Status')}}</th>
  17. <th data-breakpoints="lg">{{translate('options')}}</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. @foreach($affiliate_withdraw_requests as $key => $affiliate_withdraw_request)
  22. @php $status = $affiliate_withdraw_request->status ; @endphp
  23. @if ($affiliate_withdraw_request->user != null)
  24. <tr>
  25. <td>{{ ($key+1) + ($affiliate_withdraw_requests->currentPage() - 1)*$affiliate_withdraw_requests->perPage() }}</td>
  26. <td>{{ $affiliate_withdraw_request->created_at}}</td>
  27. <td>{{ optional($affiliate_withdraw_request->user)->name}}</td>
  28. <td>{{ optional($affiliate_withdraw_request->user)->email}}</td>
  29. <td>{{ single_price($affiliate_withdraw_request->amount)}}</td>
  30. <td>
  31. @if($status == 1)
  32. <span class="badge badge-inline badge-success">{{translate('Approved')}}</span>
  33. @elseif($status == 2)
  34. <span class="badge badge-inline badge-danger">{{translate('Rejected')}}</span>
  35. @else
  36. <span class="badge badge-inline badge-info">{{translate('Pending')}}</span>
  37. @endif
  38. </td>
  39. <td class="text-right">
  40. @if($status == 0)
  41. <a href="#" class="btn btn-soft-primary btn-icon btn-circle btn-sm" onclick="show_affiliate_withdraw_modal('{{$affiliate_withdraw_request->id}}');" title="{{ translate('Pay Now') }}">
  42. <i class="las la-money-bill"></i>
  43. </a>
  44. <a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm" onclick="affiliate_withdraw_reject_modal('{{route('affiliate.withdraw_request.reject', $affiliate_withdraw_request->id)}}');" title="{{ translate('Reject') }}">
  45. <i class="las la-trash"></i>
  46. </a>
  47. @else
  48. {{ translate('No Action Available')}}
  49. @endif
  50. </td>
  51. </tr>
  52. @endif
  53. @endforeach
  54. </tbody>
  55. </table>
  56. <div class="clearfix">
  57. <div class="pull-right">
  58. {{ $affiliate_withdraw_requests->links() }}
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. @endsection
  64. @section('modal')
  65. <div class="modal fade" id="affiliate_withdraw_modal">
  66. <div class="modal-dialog">
  67. <div class="modal-content" id="modal-content">
  68. </div>
  69. </div>
  70. </div>
  71. <div class="modal fade" id="affiliate_withdraw_reject_modal">
  72. <div class="modal-dialog modal-dialog-centered">
  73. <div class="modal-content">
  74. <div class="modal-header">
  75. <h5 class="modal-title h6">{{ translate('Affiliate Withdraw Request Reject')}}</h5>
  76. <button type="button" class="close" data-dismiss="modal">
  77. </button>
  78. </div>
  79. <div class="modal-body">
  80. <p>{{translate('Are you sure, You want to reject this?')}}</p>
  81. </div>
  82. <div class="modal-footer">
  83. <button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Cancel')}}</button>
  84. <a href="#" id="reject_link" class="btn btn-primary">{{ translate('Reject') }}</a>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. @endsection
  90. @section('script')
  91. <script type="text/javascript">
  92. function show_affiliate_withdraw_modal(id){
  93. $.post('{{ route('affiliate_withdraw_modal') }}',{_token:'{{ @csrf_token() }}', id:id}, function(data){
  94. $('#affiliate_withdraw_modal #modal-content').html(data);
  95. $('#affiliate_withdraw_modal').modal('show', {backdrop: 'static'});
  96. AIZ.plugins.bootstrapSelect('refresh');
  97. });
  98. }
  99. function affiliate_withdraw_reject_modal(reject_link){
  100. $('#affiliate_withdraw_reject_modal').modal('show');
  101. document.getElementById('reject_link').setAttribute('href' , reject_link);
  102. }
  103. </script>
  104. @endsection