Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. @extends('layouts.layout-user')
  2. @section('content')
  3. <table id="table-register" class="table table-bordered table-hover">
  4. <thead>
  5. <tr>
  6. <th colspan="10">
  7. <h2 style="display: inline-block; margin-right: 10px;">Data Pelaporan Bahaya</h2>
  8. <span style="margin:1%; float: right;"></span>
  9. <form class="w-72" action="{{route('pelaporan.index')}}" method="GET">
  10. <div class="input-group input-group-merge" style="max-width: 300px">
  11. <span class="input-group-text" id="basic-addon-search31"><i class="fa fa-search"></i></span>
  12. <input name="search" class="form-control" placeholder="Search..." aria-label="Search..." aria-describedby="basic-addon-search31"></input>
  13. </div>
  14. </form>
  15. <a href="{{ route('pelaporan.create') }}" class="btn btn-primary btn-delete" style="float: left; margin-top:1%;">Buat Pelaporan</a>
  16. </th>
  17. </tr>
  18. <tr style="background-color: #155dfa;">
  19. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">No</th>
  20. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Judul Laporan</th>
  21. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Keterangan Laporan</th>
  22. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Tanggal Dibuat</th>
  23. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Lokasi</th>
  24. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Tingkat Bahaya</th>
  25. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Status Tindakan</th>
  26. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Saran Tindakan</th>
  27. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Foto</th>
  28. <th style="vertical-align: middle; text-align: center; color: white; padding: 10px; width: 100px;">Action</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. @php
  33. $i = 1;
  34. @endphp
  35. @if($pelaporan->count() > 0)
  36. @foreach ($pelaporan as $pelaporan)
  37. <tr>
  38. <td style="text-align: center; vertical-align: middle;">{{ $i++ }}</td>
  39. <td style="text-align: center; vertical-align: middle;">{{$pelaporan->judul}}</td>
  40. <td style="text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 10em;">
  41. {{$pelaporan->keterangan}}
  42. </td>
  43. <td style="text-align: center; vertical-align: middle;">{{$pelaporan->tanggal}}</td>
  44. <td style="text-align: center; vertical-align: middle;">{{$pelaporan->lokasi}}</td>
  45. <td style="text-align: center; vertical-align: middle;">
  46. <div style="
  47. @if ($pelaporan->status === 'Ringan')
  48. background-color: #1593fa;
  49. width: 80px;
  50. height: 30px;
  51. border-radius: 10px;
  52. display: flex;
  53. justify-content: center;
  54. align-items: center;
  55. font-weight: bold;
  56. color: white;
  57. @elseif ($pelaporan->status === 'Sedang')
  58. background-color: rgb(156, 196, 54);
  59. width: 80px;
  60. height: 30px;
  61. border-radius: 10px;
  62. display: flex;
  63. justify-content: center;
  64. align-items: center;
  65. font-weight: bold;
  66. color: white;
  67. @elseif ($pelaporan->status === 'Berat')
  68. background-color: rgba(219, 71, 71, 0.799);
  69. width: 80px;
  70. height: 30px;
  71. border-radius: 10px;
  72. display: flex;
  73. justify-content: center;
  74. align-items: center;
  75. font-weight: bold;
  76. color: white;
  77. @else
  78. background-color: #ffffff;
  79. @endif
  80. ">
  81. • {{ $pelaporan->status }}
  82. </div>
  83. </td>
  84. <td style="text-align: center; vertical-align: middle;">
  85. <div style="
  86. @if ($pelaporan->tindakan->statusTindakan === 'Belum ditindak')
  87. background-image: linear-gradient(to right, #0867E9, #6BA3F0);
  88. width: 150px;
  89. height: 30px;
  90. border-radius: 10px;
  91. display: flex;
  92. justify-content: center;
  93. align-items: center;
  94. font-weight: bold;
  95. color: white;
  96. @elseif ($pelaporan->tindakan->statusTindakan === 'Diverifikasi')
  97. background-image: linear-gradient(to right, #F76D2E, #EEA45D);
  98. width: 150px;
  99. height: 30px;
  100. border-radius: 10px;
  101. display: flex;
  102. justify-content: center;
  103. align-items: center;
  104. font-weight: bold;
  105. color: white;
  106. @elseif ($pelaporan->tindakan->statusTindakan === 'Ditindak lanjuti')
  107. background-image: linear-gradient(to right, #F84B67, #F86E85);
  108. width: 150px;
  109. height: 30px;
  110. border-radius: 10px;
  111. display: flex;
  112. justify-content: center;
  113. align-items: center;
  114. font-weight: bold;
  115. color: white;
  116. @elseif ($pelaporan->tindakan->statusTindakan === 'Selesai')
  117. background-image: linear-gradient(to right, #08976B, #47D5A7);
  118. width: 150px;
  119. height: 30px;
  120. border-radius: 10px;
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. font-weight: bold;
  125. color: white;
  126. @endif
  127. ">
  128. • {{ $pelaporan->tindakan->statusTindakan }}
  129. </div>
  130. </td>
  131. <td style="text-align: center; vertical-align: middle; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
  132. {{$pelaporan->saran}}
  133. </td>
  134. <td style="text-align: center; vertical-align: middle;"><img src="{{ asset('foto/' . $pelaporan->foto) }}" alt="Foto Pelaporan" style="width: 100px; height: 100px; object-fit: cover;"></td>
  135. <td style="text-align: center; vertical-align: middle; width: 100px;">
  136. <div style="display: flex; flex-direction: column; align-items: center;">
  137. <a href="{{ route('pelaporan.edit', ['id' => $pelaporan->id]) }}" class="btn btn-delete" style="padding: 8px 16px; background-color: rgb(0, 106, 255); color: #fff; border: none; border-radius: 4px; margin-bottom: 5px;">Update</a>
  138. <a href="{{ route('pelaporan.destroy', ['id' => $pelaporan->id]) }}" class="btn btn-delete" style="padding: 8px 16px; background-color: red; color: #fff; border: none; border-radius: 4px;">Delete</a>
  139. </div>
  140. </td>
  141. </tr>
  142. @endforeach
  143. @else
  144. <tr>
  145. <td class="text-center" colspan="10">Laporan not found</td>
  146. </tr>
  147. @endif
  148. </tbody>
  149. </table>
  150. @endsection