table.blade.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <table id="example" class="table table-striped table-dark align-items-center table-flush data-table dataTable no-footer">
  2. <thead class="thead-light">
  3. <tr>
  4. <th scope="col">Kuesioner</th>
  5. <th scope="col">Pertanyaan</th>
  6. <th scope="col">Option</th>
  7. <th scope="col">Tindakan</th>
  8. </tr>
  9. </thead>
  10. <tbody>
  11. @foreach($option as $key =>$value)
  12. <tr>
  13. <td>{{\App\Model\Setting\Kuisioner\Kuisioner::where('id',$value->id_kuisioner)->value('title')}}</td>
  14. <td>{{\App\Model\Setting\Kuisioner\Question::where('id',$id_pertanyaan)->value('pertanyaan')}}</td>
  15. <td>{{$value->option}}</td>
  16. <td>
  17. <?php $id = Crypt::encryptString($value->id) ?>
  18. <?php
  19. $url = \Request::route()->getName();
  20. $getKdModule = \App\Model\Menu\Module::where('menu_path',$url)->value('kdModule');
  21. $getEdit = \App\Model\Privillage\Roleacl::where('module_id', $getKdModule)->where('role_id',Auth::user()->role_id)
  22. ->value('update_acl');
  23. $getDelete = \App\Model\Privillage\Roleacl::where('module_id', $getKdModule)->where('role_id',Auth::user()->role_id)
  24. ->value('delete_acl');
  25. ?>
  26. <a class="btn btn-success btn-sm" id="getDetail" data-toggle="modal" data-target="#detailModal" data-value="{{$value->value}}" data-option="{{$value->option}}"><i class="fa fa-file"></i></a>
  27. @if($getEdit == $getKdModule)
  28. <a class="btn btn-warning btn-sm" id="getEdit" data-toggle="modal" data-target="#editModal" data-value="{{$value->value}}" data-option="{{$value->option}}" data-id="{{$id}}"><i class="fa fa-edit"></i></a>
  29. @endif
  30. @if($getDelete == $getKdModule)
  31. <a class="btn btn-danger btn-sm" href="{{route('kuisioner-question-option-delete',$id)}}" onClick="confirm('Yakin menghapus option?')"><i class="fa fa-trash"></i></a>
  32. @endif
  33. </td>
  34. </tr>
  35. @endforeach
  36. </tbody>
  37. </table>