absence_report.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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>
  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">Assenze</h2>
  7. </div>
  8. </header>
  9. <div class="row mb-2">
  10. <div class="col">
  11. <div class="alert alert-warning text-center" role="alert">Attenzione, se l'utente viene aggiunto manualmente a un corso a cui non è associato, non verrà segnato come presente per il corso a cui è registrato</div>
  12. </div>
  13. </div>
  14. <div class="row mb-3">
  15. <div class="col-8"></div>
  16. <div class="col text-end">
  17. <div class="input-group">
  18. <input type="text" class="form-control" placeholder="Cerca utente" aria-label="Cerca utente" wire:model.defer="search">
  19. </div>
  20. </div>
  21. <div class="col-auto text-end">
  22. <button class="btn--ui" type="button" wire:click="resetSearch()">Reset</button>
  23. &nbsp;
  24. <button class="btn--ui" type="button" wire:click="applySearch()">Cerca</button>
  25. </div>
  26. </div>
  27. @foreach ($record_assenze as $record_data)
  28. <div class="row mb-5">
  29. <div class="col-12 mb-2">
  30. <h3 class="primary">{{$record_data['course']['name']}}</h3>
  31. </div>
  32. <div class="col-12">
  33. <table class="report-table">
  34. <thead>
  35. <tr>
  36. <td style="width: 20%">Cognome</td>
  37. <td style="width: 20%">Nome</td>
  38. <td style="width: 10%">N. assenze</td>
  39. <td>Date</td>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. @foreach($record_data['members'] as $member)
  44. <tr @if($loop->index % 2 == 1)style="background-color: rgba(12 97 151 / 0.05);"@endif>
  45. <td>{{$member['member']['last_name']}}</td>
  46. <td>{{$member['member']['first_name']}}</td>
  47. <td>{{$member["count"]}}</td>
  48. <td>
  49. @foreach ($member["dates"] as $calendar_date)
  50. <a href="/presences?calendarId={{$calendar_date['calendar_id']}}" target="_blank">{{$calendar_date['date']}}</a>@if (!$loop->last) - @endif
  51. @endforeach
  52. </td>
  53. </tr>
  54. @endforeach
  55. </tbody>
  56. </table>
  57. </div>
  58. </div>
  59. @endforeach
  60. {{-- <div class="row">
  61. <div class="col-12 mb-3">
  62. <h3 class="primary">Assenze {{$year}}/{{$year+1}}</h3>
  63. </div>
  64. <div class="col-12">
  65. <table class="report-table">
  66. <thead>
  67. <tr>
  68. <td>Cognome</td>
  69. <td>Nome</td>
  70. <td>Corso</td>
  71. <td>N. assenze</td>
  72. <td>Date</td>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. @foreach($records as $record)
  77. <tr>
  78. <td>{{$record["last_name"]}}</td>
  79. <td>{{$record["first_name"]}}</td>
  80. <td>{{$record["course"]}}</td>
  81. <td>{{$record["total"]}}</td>
  82. <td>{{$record["date"]}}</td>
  83. </tr>
  84. @endforeach
  85. </tbody>
  86. </table>
  87. </div>
  88. </div> --}}
  89. </div>
  90. @push('css')
  91. <link href="/css/presence_report.css" rel="stylesheet" />
  92. @endpush
  93. @push('scripts')
  94. <link href="/css/datatables.css" rel="stylesheet" />
  95. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
  96. @endpush
  97. @push('scripts')
  98. <script>
  99. $(document).ready(function() {});
  100. </script>
  101. @endpush