reminders.blade.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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" data-tablesaw="" id="tablesaw-350">
  54. <thead>
  55. <tr>
  56. <th scope="col" >Tipologia</th>
  57. <th scope="col" >Data</th>
  58. <th scope="col" >Persona</th>
  59. </tr>
  60. </thead>
  61. <tbody id="checkall-target">
  62. @foreach($records as $record)
  63. <tr>
  64. <td>{{$record["type"]}}</td>
  65. <td>{{date("d/m/Y", strtotime($record["date"]))}}</td>
  66. <td>{{$record["name"]}}</td>
  67. </tr>
  68. @endforeach
  69. </tbody>
  70. </table>
  71. <!--
  72. <div class="paginator d-flex justify-content-center">
  73. <nav aria-label="Page navigation example">
  74. <ul class="pagination">
  75. <li class="page-item">
  76. <a class="page-link" href="#" aria-label="Previous">
  77. <span aria-hidden="true"></span>
  78. </a>
  79. </li>
  80. <li class="page-item"><a class="page-link" href="#">1</a></li>
  81. <li class="page-item"><a class="page-link" href="#">2</a></li>
  82. <li class="page-item"><a class="page-link" href="#">3</a></li>
  83. <li class="page-item"><a class="page-link" href="#">3</a></li>
  84. <li class="page-item"><span class="more-page">...</span></li>
  85. <li class="page-item">
  86. <a class="page-link" href="#" aria-label="Next">
  87. <span aria-hidden="true"></span>
  88. </a>
  89. </li>
  90. </ul>
  91. </nav>
  92. </div>
  93. -->
  94. </section>
  95. </div>
  96. </div>
  97. </div>
  98. @push('scripts')
  99. <link href="/css/datatables.css" rel="stylesheet" />
  100. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
  101. <script src="/assets/js/datatables.js"></script>
  102. @endpush
  103. @push('scripts')
  104. <script>
  105. $(document).ready(function() {
  106. loadDataTable();
  107. } );
  108. Livewire.on('load-data-table', () => {
  109. setTimeout(function() {loadDataTable()}, 100);
  110. });
  111. Livewire.on('destroy-data-table', () => {
  112. $('#tablesaw-350').DataTable().destroy();
  113. });
  114. function destroyDataTable()
  115. {
  116. $('#tablesaw-350').DataTable().destroy();
  117. }
  118. function loadDataTable(){
  119. $('#tablesaw-350').DataTable({
  120. thead: {
  121. 'th': {'background-color': 'blue'}
  122. },
  123. layout: {
  124. topStart: {
  125. buttons: [{ extend: 'csv', text: 'Esporta' }, 'excel', 'pdf', { extend: 'print', text: 'Stampa' }]
  126. }
  127. },
  128. pagingType: 'numbers',
  129. "language": {
  130. "url": "/assets/js/Italian.json"
  131. }
  132. });
  133. $('#tablesaw-350 thead tr th').addClass('col');
  134. $('#tablesaw-350 thead tr th').css("background-color", "#EDF0F2");
  135. }
  136. </script>
  137. @endpush