rejected_refund.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <div class="card">
  4. <div class="card-header">
  5. <h5 class="mb-0 h6">{{translate('Rejected Request')}}</h5>
  6. </div>
  7. <div class="card-body">
  8. <table class="table aiz-table">
  9. <thead>
  10. <tr>
  11. <th>#</th>
  12. <th>{{translate('Order Code')}}</th>
  13. <th data-breakpoints="lg">{{translate('Seller Name')}}</th>
  14. <th data-breakpoints="lg">{{translate('Product')}}</th>
  15. <th data-breakpoints="lg">{{translate('Price')}}</th>
  16. <th data-breakpoints="lg">{{translate('Seller Approval')}}</th>
  17. <th>{{translate('Admin Approval')}}</th>
  18. <th data-breakpoints="lg">{{translate('Reject Reason')}}</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. @foreach($refunds as $key => $refund)
  23. <tr>
  24. <td>{{ ($key+1) + ($refunds->currentPage() - 1)*$refunds->perPage() }}</td>
  25. <td>
  26. @if($refund->order != null)
  27. {{ $refund->order->code }}
  28. @else
  29. {{ translate('Order deleted') }}
  30. @endif
  31. </td>
  32. <td>
  33. @if ($refund->seller != null)
  34. {{ $refund->seller->name }}
  35. @endif
  36. </td>
  37. <td>
  38. @if ($refund->orderDetail != null && $refund->orderDetail->product != null)
  39. <a href="{{ route('product', $refund->orderDetail->product->slug) }}" target="_blank" class="media-block">
  40. <div class="form-group row">
  41. <div class="col-md-5">
  42. <img src="{{ uploaded_asset($refund->orderDetail->product->thumbnail_img)}}" alt="Image" class="w-50px">
  43. </div>
  44. <div class="col-md-7">
  45. <div class="media-body">{{ $refund->orderDetail->product->getTranslation('name') }}</div>
  46. </div>
  47. </div>
  48. </a>
  49. @endif
  50. </td>
  51. <td>
  52. @if ($refund->orderDetail != null)
  53. {{single_price($refund->orderDetail->price)}}
  54. @endif
  55. </td>
  56. <td>
  57. @if ($refund->seller_approval == 1)
  58. <span class="badge badge-inline badge-success">{{translate('Approved')}}</span>
  59. @else
  60. <span class="badge badge-inline badge-warning">{{translate('Pending')}}</span>
  61. @endif
  62. </td>
  63. <td>
  64. @if($refund->admin_approval == 2)
  65. <span class="badge badge-inline badge-danger">{{translate('Rejected')}}</span>
  66. @endif
  67. </td>
  68. <td class="text-right">
  69. <a href="javascript:void(0);" onclick="refund_reject_reason_show('{{ route('reject_reason_show', $refund->id )}}')" class="btn btn-soft-primary btn-icon btn-circle btn-sm" title="{{ translate('Reject Reason') }}">
  70. <i class="las la-eye"></i>
  71. </a>
  72. </td>
  73. </tr>
  74. @endforeach
  75. </tbody>
  76. </table>
  77. <div class="clearfix">
  78. <div class="pull-right">
  79. {{ $refunds->appends(request()->input())->links() }}
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. @endsection
  85. @section('modal')
  86. <div class="modal fade reject_reason_show_modal" id="modal-basic">
  87. <div class="modal-dialog">
  88. <div class="modal-content">
  89. <div class="modal-header">
  90. <h5 class="modal-title h6">{{translate('Refund Request Reject Reason')}}</h5>
  91. <button type="button" class="close" data-dismiss="modal"></button>
  92. </div>
  93. <div class="modal-body reject_reason_show">
  94. </div>
  95. <div class="modal-footer">
  96. <button type="button" class="btn btn-light" data-dismiss="modal">{{translate('Close')}}</button>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. @endsection
  102. @section('script')
  103. <script type="text/javascript">
  104. function refund_reject_reason_show(url){
  105. $.get(url, function(data){
  106. $('.reject_reason_show').html(data);
  107. $('.reject_reason_show_modal').modal('show');
  108. });
  109. }
  110. </script>
  111. @endsection