wallet_request.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <div class="card">
  4. {{-- <div class="card-header">--}}
  5. <form action="" class="card-header">
  6. <div class="col">
  7. <h5 class="mb-0 h6">{{translate('Offline Wallet Recharge Requests')}}</h5>
  8. </div>
  9. <div class="col-md-3">
  10. <div class="form-group mb-0">
  11. <input type="text" class="form-control" id="name" name="name" @isset($name) value="{{ $name }}" @endisset placeholder="{{ translate('name') }}" onkeyup="filterProducts()">
  12. </div>
  13. </div>
  14. <div class="col-md-3">
  15. <div class="form-group mb-0">
  16. <input type="text" class="form-control" id="operator" name="operator" @isset($operator) value="{{ $operator}}" @endisset placeholder="{{ translate('operator') }}" onkeyup="filterProducts()">
  17. </div>
  18. </div>
  19. <div class="col-md-3">
  20. <div class="form-group mb-0">
  21. <input type="text" class="aiz-date-range form-control" value="{{ $date }}" name="date" placeholder="{{ translate('Filter by date') }}" data-format="Y-MM-DD" data-separator=" to " data-advanced-range="true" autocomplete="off">
  22. </div>
  23. </div>
  24. <button type="submit" class="btn btn-success btn-styled">{{ translate('Search') }}</button>
  25. </form>
  26. {{-- </div>--}}
  27. <div class="card-body">
  28. <table class="table aiz-table mb-0">
  29. <thead>
  30. <tr>
  31. <th>#</th>
  32. <th>{{translate('Name')}}</th>
  33. <th>{{translate('Operator')}}</th>
  34. <th>{{translate('Amount')}}</th>
  35. <th>{{translate('Method')}}</th>
  36. <th>{{translate('TXN ID')}}</th>
  37. <th>{{translate('Photo')}}</th>
  38. <th>{{translate('Approval')}}</th>
  39. <th>{{translate('Type')}}</th>
  40. <th>{{translate('Date')}}</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. @foreach($wallets as $key => $wallet)
  45. @if ($wallet->user != null)
  46. <tr>
  47. <td>{{ ($key+1) }}</td>
  48. <td>{{ $wallet->user->name }}({{$wallet->user->email}})</td>
  49. <td>
  50. @if ($wallet->operator != null)
  51. {{ $wallet->operator->user_type=='admin'?'admin':$wallet->operator->name }}
  52. @else
  53. --
  54. @endif
  55. </td>
  56. <td>{{ $wallet->amount }}</td>
  57. <td>{{ $wallet->payment_method }}</td>
  58. <td>{{ $wallet->payment_details }}</td>
  59. <td>
  60. @if ($wallet->reciept != null)
  61. <a href="{{ uploaded_asset($wallet->reciept) }}" target="_blank">{{translate('Open Reciept')}}</a>
  62. @endif
  63. </td>
  64. <td>
  65. <label class="aiz-switch aiz-switch-success mb-0">
  66. <input onchange="update_approved(this)" value="{{ $wallet->id }}" type="checkbox" @if($wallet->approval == 1) checked @endif >
  67. <span class="slider round"></span>
  68. </label>
  69. </td>
  70. <td>
  71. @if( $wallet->type == 1 )
  72. {{ translate('Balance Recharge')}}
  73. @else
  74. {{ translate('Guarantee Recharge')}}
  75. @endif
  76. </td>
  77. <td>{{ $wallet->created_at }}</td>
  78. </tr>
  79. @endif
  80. @endforeach
  81. </tbody>
  82. </table>
  83. <div class="aiz-pagination">
  84. {{ $wallets->appends(request()->input())->links() }}
  85. </div>
  86. </div>
  87. </div>
  88. @endsection
  89. @section('script')
  90. <script type="text/javascript">
  91. function update_approved(el){
  92. if(el.checked){
  93. var status = 1;
  94. }
  95. else{
  96. var status = 0;
  97. }
  98. $.post('{{ route('offline_recharge_request.approved') }}', {_token:'{{ csrf_token() }}', id:el.value, status:status}, function(data){
  99. if(data == 1){
  100. AIZ.plugins.notify('success', '{{ translate('successfully') }}');
  101. }
  102. else{
  103. AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
  104. }
  105. });
  106. }
  107. </script>
  108. @endsection