course_member_one.blade.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <div class="col card--ui" id="card--dashboard">
  2. <header id="title--section" style="display:none !important" class="d-flex align-items-center justify-content-between">
  3. <div class="title--section_name d-flex align-items-center justify-content-between">
  4. <i class="ico--ui title_section utenti me-2"></i>
  5. <h2 class="primary">Durata corsi</h2>
  6. </div>
  7. </header>
  8. <section id="resume-table">
  9. <div class="compare--chart_wrapper d-none"></div>
  10. <table class="table tablesaw tableHead tablesaw-stack" id="tablesaw-350" width="100%">
  11. <thead>
  12. <tr>
  13. <th scope="col">Tipologia</th>
  14. <th scope="col">...</th>
  15. </tr>
  16. </thead>
  17. <tbody id="checkall-target">
  18. @foreach($records as $record)
  19. <tr>
  20. <td>{{$record["name"]}}</td>
  21. <td>
  22. <a href="/course_member_two?type={{$record["type"]}}" type="button" class="btn" ><b> <i class="fa-solid fa-chevron-right"></i></b></button>
  23. </td>
  24. </tr>
  25. @endforeach
  26. </tbody>
  27. </table>
  28. </section>
  29. </div>
  30. @push('scripts')
  31. <link href="/css/datatables.css" rel="stylesheet" />
  32. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
  33. <script src="/assets/js/datatables.js"></script>
  34. <script src="https://cdn.datatables.net/buttons/3.0.2/js/buttons.dataTables.js"></script>
  35. <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
  36. <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
  37. <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
  38. @endpush
  39. @push('scripts')
  40. <script>
  41. $(document).ready(function() {
  42. loadDataTable();
  43. } );
  44. Livewire.on('load-data-table', () => {
  45. loadDataTable();
  46. });
  47. function loadDataTable(){
  48. let date = new Date();
  49. let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
  50. if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
  51. $('#tablesaw-350').DataTable().destroy();
  52. }
  53. $('#tablesaw-350').DataTable({
  54. processing: true,
  55. stateSave: true,
  56. thead: {
  57. 'th': {'background-color': 'blue'}
  58. },
  59. layout: {
  60. topStart : null,
  61. topEnd : null,
  62. top1A: {
  63. // buttons: [
  64. // {
  65. // extend: 'collection',
  66. // text: 'ESPORTA',
  67. buttons: [
  68. {
  69. extend: 'excelHtml5',
  70. text: '<i class="fa-solid fa-file-excel"></i>',
  71. action: newexportaction,
  72. title: date_export + 'Durata corsi',
  73. exportOptions: {
  74. columns: ":not(':last')"
  75. }
  76. },
  77. {
  78. extend: 'pdfHtml5',
  79. text: '<i class="fa-solid fa-file-pdf"></i>',
  80. action: newexportaction,
  81. title: date_export + 'Durata corsi',
  82. exportOptions: {
  83. columns: ":not(':last')"
  84. }
  85. },
  86. {
  87. extend: 'print',
  88. action: newexportaction,
  89. text: '<i class="fa-solid fa-print"></i>',
  90. title: date_export + 'Durata corsi',
  91. exportOptions: {
  92. columns: ":not(':last')"
  93. }
  94. }
  95. ],
  96. // dropup: true
  97. // }
  98. // ]
  99. },
  100. top1B : {
  101. pageLength: {
  102. menu: [[10, 25, 50, 100, 100000], [10, 25, 50, 100, "Tutti"]]
  103. }
  104. },
  105. top1C :'search',
  106. bottomEnd: {
  107. paging: {
  108. boundaryNumbers: false
  109. }
  110. }
  111. },
  112. pagingType: 'first_last_numbers',
  113. language: {
  114. "url": "/assets/js/Italian.json",
  115. paginate: {
  116. first: '<i class="fa-solid fa-angles-left"></i>',
  117. last: '<i class="fa-solid fa-angles-right"></i>',
  118. }
  119. },/*,
  120. "fnInitComplete": function (oSettings, json) {
  121. var html = '&nbsp;<a href="#" class="addData btn--ui"><i class="fa-solid fa-plus"></i></a>';
  122. $(".dt-search").append(html);
  123. }*/
  124. });
  125. $('#tablesaw-350 thead tr th').addClass('col');
  126. $('#tablesaw-350 thead tr th').css("background-color", "#f6f8fa");
  127. $(document).ready(function() {
  128. $(document).on("click",".addData",function() {
  129. $(".title--section_addButton").trigger("click")
  130. });
  131. } );
  132. }
  133. </script>
  134. @endpush