calendar_remove.blade.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <div class="col card--ui" id="card--dashboard">
  2. <a class="btn--ui lightGrey" href="/presence_reports"><i class="fa-solid fa-arrow-left"></i></a><br>
  3. <header id="title--section" style="display:none !important" class="d-flex align-items-center justify-content-between">
  4. <div class="title--section_name d-flex align-items-center justify-content-between">
  5. <i class="ico--ui title_section utenti me-2"></i>
  6. <h2 class="primary">Lezioni da rimuovere</h2>
  7. </div>
  8. </header>
  9. <br>
  10. <div class="row">
  11. <div class="col-12 mb-3">
  12. <h3 class="primary">Lezioni inserite senza nessun iscritto</h3>
  13. </div>
  14. <div class="col-12">
  15. <table class="report-table">
  16. <thead>
  17. <tr>
  18. <td></td>
  19. <td>Data</td>
  20. <td>Ora</td>
  21. <td>Corso</td>
  22. <td></td>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. @foreach($records as $record)
  27. <tr>
  28. <td><input type="checkbox" value="{{$record["id"]}}" class="chk"></td>
  29. <td>{{$record["date"]}}</td>
  30. <td>{{$record["hour"]}}</td>
  31. <td>{{$record["name"]}}</td>
  32. <td><a href="/presences?calendarId={{$record["id"]}}" target="_blank">Visualizza</a></td>
  33. </tr>
  34. @endforeach
  35. </tbody>
  36. <span id="deleting" style="display:none">Eliminazione in corso...</span>
  37. <input type="button" class="btDelete btn--ui" value="Elimina">
  38. </table>
  39. </div>
  40. </div>
  41. </div>
  42. @push('css')
  43. <link href="/css/presence_report.css" rel="stylesheet" />
  44. @endpush
  45. @push('scripts')
  46. <link href="/css/datatables.css" rel="stylesheet" />
  47. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
  48. @endpush
  49. @push('scripts')
  50. <script>
  51. $(document).ready(function() {
  52. var ids = [];
  53. $('.chk').change(function() {
  54. console.log($(this).val());
  55. if(this.checked)
  56. {
  57. ids.push($(this).val());
  58. }
  59. else
  60. {
  61. var index = ids.indexOf($(this).val());
  62. if (index > -1)
  63. {
  64. ids.splice(index, 1);
  65. }
  66. }
  67. });
  68. $(".btDelete").click(function(){
  69. $("#deleting").show();
  70. @this.removeSelected(ids);
  71. });
  72. });
  73. </script>
  74. @endpush