reminders.blade.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <div class="col">
  2. <div class="row h-100">
  3. <div class="col-auto filterWrapper" id="filter--section" wire:ignore.self>
  4. <aside>
  5. <header>
  6. <h2>Filtra Scadenze</h2>
  7. </header>
  8. <form action="" id="filter--form" class="dark-form row">
  9. <div class="filter--item">
  10. <span class="filter--item_title">Tipologia</span>
  11. <div class="filter--item_formElement row">
  12. <div class="col-12">
  13. <div class="form-check form-check-inline d-inline-flex align-items-center">
  14. <input class="form-check-input" type="checkbox" wire:model="filterC" onclick="destroyDataTable()">
  15. <label class="form-check-label ms-2" >Certificato</label>
  16. </div>
  17. <div class="form-check form-check-inline d-inline-flex align-items-center">
  18. <input class="form-check-input" type="checkbox" wire:model='filterT' onclick="destroyDataTable()">
  19. <label class="form-check-label ms-2" >Tessera</label>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="filter--item">
  25. <span class="filter--item_title">Periodo scadenza</span>
  26. <div class="filter--item_formElement">
  27. <input id="date" type="date" class="form-control" wire:model="filterFrom" style="background-color:white">
  28. </div>
  29. <div class="filter--item_formElement">
  30. <input id="date" type="date" class="form-control" wire:model="filterTo" style="background-color:white">
  31. </div>
  32. </div>
  33. </form>
  34. <footer>
  35. <div class="filter--buttons d-flex align-items-center justify-content-between">
  36. <button class="btn--ui small dark disable" wire:click.prevent="disableSearch()" onclick="destroyDataTable()">cancella</button>
  37. <button class="btn--ui small white" wire:click.prevent="search()" onclick="destroyDataTable()">filtra</button>
  38. </div>
  39. </footer>
  40. </aside>
  41. </div>
  42. <div class="col card--ui" id="card--dashboard">
  43. <header id="title--section" class="d-flex align-items-center justify-content-between">
  44. <div class="title--section_name d-flex align-items-center justify-content-between">
  45. <i class="ico--ui title_section utenti me-2"></i>
  46. <h2 class="primary">Scadenze</h2>
  47. </div>
  48. </header>
  49. <button id="open-filter" onclick="pcsh1()"></button>
  50. <button id="close-filter" onclick="pcsh2()"></button>
  51. <section id="resume-table">
  52. <div class="compare--chart_wrapper d-none"></div>
  53. <table class="table tablesaw tablesaw-stack" id="tablesaw-350">
  54. <thead>
  55. <tr>
  56. <th scope="col" >Tipologia</th>
  57. <th scope="col" >Data</th>
  58. <th scope="col" >Cognome</th>
  59. <th scope="col" >Nome</th>
  60. </tr>
  61. </thead>
  62. <tbody id="checkall-target">
  63. @foreach($records as $record)
  64. <tr>
  65. <td>{{$record["type"]}}</td>
  66. <td>{{date("d/m/Y", strtotime($record["date"]))}}</td>
  67. <td>{{$record["last_name"]}}</td>
  68. <td>{{$record["first_name"]}}</td>
  69. </tr>
  70. @endforeach
  71. </tbody>
  72. </table>
  73. <!--
  74. <div class="paginator d-flex justify-content-center">
  75. <nav aria-label="Page navigation example">
  76. <ul class="pagination">
  77. <li class="page-item">
  78. <a class="page-link" href="#" aria-label="Previous">
  79. <span aria-hidden="true"></span>
  80. </a>
  81. </li>
  82. <li class="page-item"><a class="page-link" href="#">1</a></li>
  83. <li class="page-item"><a class="page-link" href="#">2</a></li>
  84. <li class="page-item"><a class="page-link" href="#">3</a></li>
  85. <li class="page-item"><a class="page-link" href="#">3</a></li>
  86. <li class="page-item"><span class="more-page">...</span></li>
  87. <li class="page-item">
  88. <a class="page-link" href="#" aria-label="Next">
  89. <span aria-hidden="true"></span>
  90. </a>
  91. </li>
  92. </ul>
  93. </nav>
  94. </div>
  95. -->
  96. </section>
  97. </div>
  98. </div>
  99. </div>
  100. @push('scripts')
  101. <link href="/css/datatables.css" rel="stylesheet" />
  102. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
  103. <script src="/assets/js/datatables.js"></script>
  104. <script src="https://cdn.datatables.net/buttons/3.0.2/js/buttons.dataTables.js"></script>
  105. <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
  106. <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
  107. <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
  108. @endpush
  109. @push('scripts')
  110. <script>
  111. $(document).ready(function() {
  112. loadDataTable();
  113. } );
  114. Livewire.on('load-data-table', () => {
  115. setTimeout(function() {loadDataTable()}, 100);
  116. });
  117. Livewire.on('destroy-data-table', () => {
  118. $('#tablesaw-350').DataTable().destroy();
  119. });
  120. function destroyDataTable()
  121. {
  122. $('#tablesaw-350').DataTable().destroy();
  123. }
  124. function loadDataTable(){
  125. $('#tablesaw-350').DataTable({
  126. thead: {
  127. 'th': {'background-color': 'blue'}
  128. },
  129. layout: {
  130. topStart: {
  131. buttons: [
  132. {
  133. extend: 'excelHtml5',
  134. title: 'Scadenze',
  135. exportOptions: {
  136. columns: ":not(':last')"
  137. }
  138. },
  139. {
  140. extend: 'pdfHtml5',
  141. title: 'Scadenze',
  142. exportOptions: {
  143. columns: ":not(':last')"
  144. }
  145. },
  146. {
  147. extend: 'print',
  148. text: 'Stampa',
  149. title: 'Scadenze',
  150. exportOptions: {
  151. columns: ":not(':last')"
  152. }
  153. }
  154. ]
  155. }
  156. },
  157. pagingType: 'numbers',
  158. "language": {
  159. "url": "/assets/js/Italian.json"
  160. }
  161. });
  162. $('#tablesaw-350 thead tr th').addClass('col');
  163. $('#tablesaw-350 thead tr th').css("background-color", "#EDF0F2");
  164. }
  165. </script>
  166. @endpush