appeals.blade.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @extends('admin.partial.template-full')
  2. @section('section')
  3. <div class="title mb-3">
  4. <h3 class="font-weight-bold d-inline-block">Appeals</h3>
  5. <span class="float-right">
  6. </span>
  7. </div>
  8. <div class="row">
  9. <div class="col-12 col-md-3 mb-3">
  10. <div class="card border bg-primary text-white rounded-pill shadow">
  11. <div class="card-body pl-4 ml-3">
  12. <p class="h1 font-weight-bold mb-1" style="font-weight: 700">{{App\AccountInterstitial::whereNull('appeal_handled_at')->whereNotNull('appeal_requested_at')->count()}}</p>
  13. <p class="lead mb-0 font-weight-lighter">active appeals</p>
  14. </div>
  15. </div>
  16. <div class="mt-3 card border bg-warning text-dark rounded-pill shadow">
  17. <div class="card-body pl-4 ml-3">
  18. <p class="h1 font-weight-bold mb-1" style="font-weight: 700">{{App\AccountInterstitial::whereNotNull('appeal_handled_at')->whereNotNull('appeal_requested_at')->count()}}</p>
  19. <p class="lead mb-0 font-weight-lighter">closed appeals</p>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="col-12 col-md-8 offset-md-1">
  24. <ul class="list-group">
  25. @if($appeals->count() == 0)
  26. <li class="list-group-item text-center py-5">
  27. <p class="mb-0 py-5 font-weight-bold">No appeals found!</p>
  28. </li>
  29. @endif
  30. @foreach($appeals as $appeal)
  31. <a class="list-group-item text-decoration-none text-dark" href="/i/admin/reports/appeal/{{$appeal->id}}">
  32. <div class="d-flex justify-content-between align-items-center">
  33. <div class="d-flex align-items-center">
  34. <img src="{{$appeal->has_media ? $appeal->status->thumb(true) : '/storage/no-preview.png'}}" width="64" height="64" class="rounded border">
  35. <div class="ml-2">
  36. <span class="d-inline-block text-truncate">
  37. <p class="mb-0 small font-weight-bold text-primary">{{$appeal->type}}</p>
  38. @if($appeal->item_type)
  39. <p class="mb-0 font-weight-bold">{{starts_with($appeal->item_type, 'App\\') ? explode('\\',$appeal->item_type)[1] : $appeal->item_type}}</p>
  40. @endif
  41. </span>
  42. </div>
  43. </div>
  44. <div class="d-block">
  45. <p class="mb-0 font-weight-bold">&commat;{{$appeal->user->username}}</p>
  46. <p class="mb-0 small text-muted font-weight-bold">{{$appeal->created_at->diffForHumans(null, null, true)}}</p>
  47. </div>
  48. <div class="d-inline-block">
  49. <p class="mb-0 small">
  50. <i class="fas fa-chevron-right fa-2x text-lighter"></i>
  51. </p>
  52. </div>
  53. </div>
  54. </a>
  55. @endforeach
  56. </ul>
  57. <p>{!!$appeals->render()!!}</p>
  58. </div>
  59. </div>
  60. @endsection