records.blade.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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">Prima nota</h2>
  6. </div>
  7. </header>
  8. <section id="subheader" class="">
  9. <!--
  10. <form action="" class="group--action d-flex align-items-center">
  11. <select class="form-select form-select-lg me-1" aria-label=".form-select-lg example">
  12. <option selected>Open this select menu</option>
  13. <option value="1">One</option>
  14. <option value="2">Two</option>
  15. <option value="3">Three</option>
  16. </select>
  17. <button type="submit" class="btn--ui">applica</button>
  18. </form>
  19. -->
  20. <div class="row g-3">
  21. <div class="col-md-2">
  22. Utente
  23. <select name="search_member_id" class="form-select filterMember" wire:model="filterMember">
  24. <option value="">--Seleziona--</option>
  25. @foreach($members as $member)
  26. <option value="{{$member->id}}">{{$member->last_name}} {{$member->first_name}}</option>
  27. @endforeach
  28. </select>
  29. </div>
  30. <div class="col-md-2">
  31. Fornitore
  32. <select name="search_supplier_id" class="form-select filterSupplier" wire:model="filterSupplier">
  33. <option value="">--Seleziona--</option>
  34. @foreach($suppliers as $supplier)
  35. <option value="{{$supplier->id}}">{{$supplier->name}}</option>
  36. @endforeach
  37. </select>
  38. </div>
  39. <div class="col-md-4">
  40. Causale
  41. <select name="search_causal_id[]" class="form-select filterCausals me-2" multiple="multiple" wire:model="filterCausals">
  42. @foreach($causals as $causal)
  43. <option value="{{$causal["id"]}}">{!!$causal["name"]!!}
  44. @endforeach
  45. </select>
  46. </div>
  47. </div>
  48. <div class="row g-3">
  49. <div class="col-md-2">
  50. <span class="date_span">Dal</span><input type="date" wire:model="fromDate" class="form-control">
  51. </div>
  52. <div class="col-md-2">
  53. <span class="date_span ms-2">al</span><input type="date" wire:model="toDate" class="form-control">
  54. </div>
  55. </div>
  56. <div class="row mt-2">
  57. <div class="col-md-1">
  58. <div class="dropdown">
  59. <button class="btn--ui_outline light dropdown-toggle" type="button" id="exportDropdown" data-bs-toggle="dropdown" aria-expanded="false"
  60. style="color:#10172A;">
  61. ESPORTA
  62. </button>
  63. <ul class="dropdown-menu" aria-labelledby="exportDropdown">
  64. <li><a class="dropdown-item" href="#" wire:click="export()">Excel</a></li>
  65. <li><a class="dropdown-item" href="#" id="print">Stampa</a></li>
  66. </ul>
  67. </div>
  68. </div>
  69. <div class="col-md-auto ms-auto">
  70. <div class="prima--nota_buttons">
  71. <button class="btn--ui lightGrey reset reset" style="color:#10172A;" onclick="reset()">RESET</button>
  72. </div>
  73. </div>
  74. </div>
  75. </section>
  76. <section id="resume-table" class="scrollTable records-table">
  77. <div id="loading-spinner" wire:loading wire:target="render, filterCausals, filterMember, filterSupplier, fromDate, toDate" class="text-center my-4">
  78. <div class="spinner-border text-primary" role="status" style="width:5rem; height: 5rem;">
  79. <span class="visually-hidden">Loading...</span>
  80. </div>
  81. <p class="mt-2">Caricamento dati in corso...</p>
  82. </div>
  83. <!--
  84. <canvas id="recordChart"></canvas>
  85. -->
  86. <table class="table tablesaw tableHead tablesaw-stack" id="tablesaw-350" width="100%">
  87. <thead>
  88. <tr>
  89. <th scope="col">Data</th>
  90. <th scope="col" style="border-left:3px solid white;">Causale</th>
  91. <th scope="col" style="border-left:3px solid white;">Dettaglio Causale</th>
  92. <th scope="col" style="border-left:3px solid white;">Stato</th>
  93. <th scope="col" style="border-left:3px solid white;">Nominativo</th>
  94. @foreach($payments as $p)
  95. <th colspan="2" scope="col" style="text-align:center; border-left:3px solid white;">{{$p->name}}</th>
  96. @endforeach
  97. </tr>
  98. <tr>
  99. <th scope="col"></th>
  100. <th scope="col" style="border-left:3px solid white;"></th>
  101. <th scope="col" style="border-left:3px solid white;"></th>
  102. <th scope="col" style="border-left:3px solid white;"></th>
  103. <th scope="col" style="border-left:3px solid white;"></th>
  104. @foreach($payments as $p)
  105. @if($p->type == 'ALL')
  106. <th scope="col" style="text-align:center; border-left:3px solid white;">Entrate</th>
  107. <th scope="col" style="text-align:center">Uscite</th>
  108. @elseif($p->type == 'IN')
  109. <th scope="col" style="text-align:center; border-left:3px solid white;">Entrate</th>
  110. <th scope="col" style="text-align:center;"></th>
  111. @elseif($p->type == 'OUT')
  112. <th style="border-left:3px solid white;"></th>
  113. <th scope="col" style="text-align:center;">Uscite</th>
  114. @endif
  115. @endforeach
  116. </tr>
  117. </thead>
  118. <tbody id="checkall-target">
  119. @php
  120. $count = 0;
  121. @endphp
  122. @foreach($records as $causal => $record)
  123. <tr>
  124. @php
  125. $check = strpos($causal, "$") ? explode("$", $causal)[1] : $causal;
  126. list($d, $c, $n, $det, $del) = explode("§", $check);
  127. @endphp
  128. <td style="background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">{{date("d/m/Y", strtotime($d))}}</td>
  129. <td style="border-left:3px solid white !important;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">{{$c}}</td>
  130. <td style="border-left:3px solid white !important;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">{{$det}}</td>
  131. <td style="border-left:3px solid white !important;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">
  132. @if($del == 'DELETED')
  133. <span style='color:red'>Annullata</span>
  134. @endif
  135. </td>
  136. <td style="border-left:3px solid white !important;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">{{$n}}</td>
  137. @foreach($payments as $p)
  138. @if(isset($record[$p->name]))
  139. <td style="text-align:right; border-left:3px solid white !important;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">
  140. @if(isset($record[$p->name]["IN"]))
  141. <span class="tablesaw-cell-content " style="color:green">{{formatPrice($record[$p->name]["IN"])}}</span>
  142. @endif
  143. </td>
  144. <td style="text-align:right;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}">
  145. @if(isset($record[$p->name]["OUT"]))
  146. <span class="tablesaw-cell-content " style="color:red">{{formatPrice($record[$p->name]["OUT"])}}</span>
  147. @endif
  148. </td>
  149. @else
  150. <td style="border-left:3px solid white !important;background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}"></td>
  151. <td style="background-color:{{$count % 2 == 0 ? 'white' : '#f2f4f7'}}"></td>
  152. @endif
  153. @endforeach
  154. </tr>
  155. @php
  156. $count++;
  157. @endphp
  158. @endforeach
  159. </tbody>
  160. <tfoot>
  161. <tr>
  162. <td></td>
  163. <td></td>
  164. <td></td>
  165. <td></td>
  166. <td><b>Totale</b></td>
  167. @foreach($payments as $p)
  168. @if(isset($totals[$p->name]))
  169. @if($p->type == 'ALL')
  170. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
  171. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
  172. @elseif($p->type == 'IN')
  173. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
  174. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>&nbsp;</b></span></td>
  175. @elseif($p->type == 'OUT')
  176. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>&nbsp;</b></span></td>
  177. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
  178. @endif
  179. @else
  180. @if($p->type == 'ALL')
  181. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
  182. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
  183. @elseif($p->type == 'IN')
  184. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
  185. <td style="text-align:center"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>&nbsp;</b></span></td>
  186. @elseif($p->type == 'OUT')
  187. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>&nbsp;</b></span></td>
  188. <td style="text-align:center"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
  189. @endif
  190. @endif
  191. @endforeach
  192. </tr>
  193. <tr style="display:none">
  194. <td></td>
  195. <td><b>Differenza</b></td>
  196. @foreach($payments as $p)
  197. @if(isset($totals[$p->name]))
  198. @php
  199. $diff = $totals[$p->name]["IN"] - $totals[$p->name]["OUT"];
  200. @endphp
  201. @if($diff < 0)
  202. <td></td>
  203. @endif
  204. <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:{{$diff > 0 ? 'green' : 'red'}}; font-size:18px;"><b>{{formatPrice($diff)}}</b></span></td>
  205. @if($diff > 0)
  206. <td></td>
  207. @endif
  208. @else
  209. <td colspan="2" style="text-align:right"><b>{{formatPrice(0)}}</b></td>
  210. @endif
  211. @endforeach
  212. </tr>
  213. </tfoot>
  214. </table>
  215. <!--
  216. <div class="paginator d-flex justify-content-center">
  217. <nav aria-label="Page navigation example">
  218. <ul class="pagination">
  219. <li class="page-item">
  220. <a class="page-link" href="#" aria-label="Previous">
  221. <span aria-hidden="true"></span>
  222. </a>
  223. </li>
  224. <li class="page-item"><a class="page-link" href="#">1</a></li>
  225. <li class="page-item"><a class="page-link" href="#">2</a></li>
  226. <li class="page-item"><a class="page-link" href="#">3</a></li>
  227. <li class="page-item"><a class="page-link" href="#">3</a></li>
  228. <li class="page-item"><span class="more-page">...</span></li>
  229. <li class="page-item">
  230. <a class="page-link" href="#" aria-label="Next">
  231. <span aria-hidden="true"></span>
  232. </a>
  233. </li>
  234. </ul>
  235. </nav>
  236. </div>
  237. -->
  238. <button type="button" class="btn btn-floating btn-lg" id="btn-back-to-bottom" ><i class="fas fa-arrow-down"></i></button>
  239. <button type="button" class="btn btn-floating btn-lg" id="btn-back-to-top" ><i class="fas fa-arrow-up"></i></button>
  240. </section>
  241. </div>
  242. @push('scripts')
  243. <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  244. @endpush
  245. @push('scripts')
  246. <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
  247. <style>
  248. .loading-overlay {å
  249. position: fixed;
  250. top: 0;
  251. left: 0;
  252. width: 100%;
  253. height: 100%;
  254. background-color: rgba(255, 255, 255, 0.7);
  255. z-index: 9999;
  256. display: flex;
  257. justify-content: center;
  258. align-items: center;
  259. flex-direction: column;
  260. }
  261. #btn-back-to-top {
  262. background-color: #0C6197;
  263. color: white;
  264. position: fixed;
  265. /* bottom: 20px; */
  266. /* right: 20px; */
  267. display: none;
  268. }
  269. #btn-back-to-bottom {
  270. background-color: #0C6197;
  271. color: white;
  272. position: fixed;
  273. /* top: 120px; */
  274. /* right: 20px; */
  275. z-index: 9999;
  276. display: none;
  277. }
  278. .scrollTable {
  279. margin-left: 0px ;
  280. margin-right: 0px ;
  281. padding: 15px;
  282. /*max-width: 800px !important;*/
  283. overflow-x: auto;
  284. overflow-y: auto;
  285. white-space: nowrap;
  286. border: 1px solid #ddd;
  287. }
  288. ::-webkit-scrollbar-thumb {
  289. background: #e4e4e4;
  290. border-radius: 10px;
  291. }
  292. table thead {
  293. /* Important */
  294. position: sticky;
  295. z-index: 100;
  296. top: 0;
  297. }
  298. .select2-container--default .select2-selection--single{
  299. background-color: #E9F0F5;
  300. border: 0.0625rem solid #DFE5EB;
  301. font-size: 0.75rem;
  302. }
  303. .select2-selection
  304. {
  305. height: 38px !important;
  306. }
  307. .select2-selection__rendered
  308. {
  309. padding-top:3px;
  310. }
  311. .select2 {
  312. width:100% !important;
  313. }
  314. .i{
  315. font-size:16px;
  316. font-weight:bold;
  317. }
  318. .cellBorder
  319. {
  320. border-left: 1px solid grey;
  321. }
  322. .select2-selection--multiple{
  323. overflow: hidden !important;
  324. height: auto !important;
  325. }
  326. .select2-container {
  327. box-sizing: border-box;
  328. display: inline-block;
  329. margin: 0;
  330. position: relative;
  331. vertical-align: middle;
  332. }
  333. .select2-container .select2-selection--single {
  334. box-sizing: border-box;
  335. cursor: pointer;
  336. display: block;
  337. height: 38px;
  338. user-select: none;
  339. -webkit-user-select: none;
  340. }
  341. .select2-container .select2-selection--single .select2-selection__rendered {
  342. display: block;
  343. padding-left: 8px;
  344. padding-right: 20px;
  345. overflow: hidden;
  346. text-overflow: ellipsis;
  347. white-space: nowrap;
  348. }
  349. button#exportDropdown.btn--ui_outline.light {
  350. font-weight: normal !important;
  351. }
  352. .btn--ui_outline.light.dropdown-toggle:active,
  353. .btn--ui_outline.light.dropdown-toggle:focus,
  354. .btn--ui_outline.light.dropdown-toggle.show {
  355. background-color: transparent !important;
  356. color: #10172A !important;
  357. box-shadow: none !important;
  358. }
  359. .btn--ui_outline.light.dropdown-toggle:hover {
  360. background-color: transparent !important;
  361. color: #10172A !important;
  362. }
  363. </style>
  364. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
  365. <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
  366. <script src="/assets/js/aCollapTable.js"></script>
  367. @endpush
  368. @push('scripts')
  369. <script>
  370. Livewire.on('load-table', () => {
  371. load();
  372. });
  373. function load()
  374. {
  375. $(document).ready(function(){
  376. $(document).on("keypress", $('.filterCausals'), function (e) {
  377. setTimeout(() => {
  378. $(".select2-results__option").each(function(){
  379. var txt = $(this).html();
  380. var count = (txt.match(/-/g) || []).length;
  381. $(this).addClass('paddingLeftSelect' + count);
  382. });
  383. }, 100);
  384. });
  385. $('.filterCausals').select2({"language": {"noResults": function(){return "Nessun risultato";}}});
  386. $('.filterCausals').on('change', function (e) {
  387. var data = $('.filterCausals').select2("val");
  388. @this.set('filterCausals', data);
  389. });
  390. $('.filterCausals').on('select2:open', function (e) {
  391. setTimeout(() => {
  392. $(".select2-results__option").each(function(){
  393. var txt = $(this).html();
  394. var count = (txt.match(/-/g) || []).length;
  395. $(this).addClass('paddingLeftSelect' + count);
  396. });
  397. }, 100);
  398. });
  399. $('.filterMember').select2({"language": {"noResults": function(){return "Nessun risultato";}}});
  400. $('.filterMember').on('change', function (e) {
  401. var data = $('.filterMember').select2("val");
  402. @this.set('filterMember', data);
  403. });
  404. $('.filterSupplier').select2({"language": {"noResults": function(){return "Nessun risultato";}}});
  405. $('.filterSupplier').on('change', function (e) {
  406. var data = $('.filterSupplier').select2("val");
  407. @this.set('filterSupplier', data);
  408. });
  409. });
  410. }
  411. Livewire.on('load-select', () => {
  412. $('.filterCausals').select2({"language": {"noResults": function(){return "Nessun risultato";}}});
  413. $('.filterCausals').on('change', function (e) {
  414. var data = $('.filterCausals').select2("val");
  415. @this.set('filterCausals', data);
  416. });
  417. $('.filterMember').select2({"language": {"noResults": function(){return "Nessun risultato";}}});
  418. $('.filterMember').on('change', function (e) {
  419. var data = $('.filterMember').select2("val");
  420. @this.set('filterMember', data);
  421. });
  422. $('.filterSupplier').select2({"language": {"noResults": function(){return "Nessun risultato";}}});
  423. $('.filterSupplier').on('change', function (e) {
  424. var data = $('.filterSupplier').select2("val");
  425. @this.set('filterSupplier', data);
  426. });
  427. setMaxWidth();
  428. setMaxHeight();
  429. });
  430. load();
  431. </script>
  432. @endpush
  433. @push('scripts')
  434. <script>
  435. function printData()
  436. {
  437. var divToPrint=document.getElementById("tablesaw-350");
  438. newWin= window.open("");
  439. var htmlToPrint = '' +
  440. '<style type="text/css">' +
  441. 'table th, table td {' +
  442. 'border:1px solid #000;' +
  443. 'padding:0.5em;' +
  444. '}' +
  445. '</style>';
  446. htmlToPrint += divToPrint.outerHTML;
  447. newWin.document.write(htmlToPrint);
  448. newWin.document.close();
  449. newWin.print();
  450. newWin.close();
  451. }
  452. document.querySelector("#print").addEventListener("click", function(){
  453. printData();
  454. });
  455. $( document ).ready( function(){
  456. setMaxWidth();
  457. setMaxHeight();
  458. $( window ).bind( "resize", setMaxWidth ); //Remove this if it's not needed. It will react when window changes size.
  459. $( window ).bind( "resize", setMaxHeight );
  460. $(".open-filter").click(function(){
  461. setMaxWidth();
  462. setMaxHeight();
  463. });
  464. });
  465. function setMaxWidth() {
  466. // $("#resume-table").width( Math.round( $(window ).width() - size ) ) ;
  467. }
  468. function setMaxHeight() {
  469. // $("#resume-table").height( Math.round( $(window ).height() - 300 ) ) ;
  470. }
  471. let mybuttonBottom = document.getElementById("btn-back-to-bottom");
  472. let mybutton = document.getElementById("btn-back-to-top");
  473. // When the user scrolls down 20px from the top of the document, show the button
  474. window.onscroll = function () {
  475. scrollFunction();
  476. };
  477. const element = document.getElementById('resume-table');
  478. element.onscroll = (e)=>{
  479. scrollFunction();
  480. };
  481. /*if (element.scrollTop < lastScrollTop){
  482. // upscroll
  483. return;
  484. }
  485. lastScrollTop = element.scrollTop <= 0 ? 0 : element.scrollTop;
  486. if (element.scrollTop + element.offsetHeight>= element.scrollHeight ){
  487. console.log("End");
  488. }
  489. }*/
  490. function scrollFunction() {
  491. if (
  492. element.scrollTop > 20
  493. ) {
  494. mybutton.style.display = "block";
  495. mybuttonBottom.style.display = "block";
  496. } else {
  497. mybutton.style.display = "none";
  498. mybuttonBottom.style.display = "none";
  499. }
  500. }
  501. function scrollFunctionOld() {
  502. if (
  503. document.body.scrollTop > 20 ||
  504. document.documentElement.scrollTop > 20
  505. ) {
  506. mybutton.style.display = "block";
  507. mybuttonBottom.style.display = "block";
  508. } else {
  509. mybutton.style.display = "none";
  510. mybuttonBottom.style.display = "none";
  511. }
  512. }
  513. // When the user clicks on the button, scroll to the top of the document
  514. mybutton.addEventListener("click", backToTop);
  515. mybuttonBottom.addEventListener("click", backToBottom);
  516. function backToTop() {
  517. $('#resume-table').scrollTop(0);
  518. /*document.body.scrollTop = 0;
  519. document.documentElement.scrollTop = 0;*/
  520. }
  521. function backToBottom() {
  522. $('#resume-table').scrollTop($('#resume-table')[0].scrollHeight);
  523. //window.scrollTo(0, document.body.scrollHeight);
  524. }
  525. function reset()
  526. {
  527. $('.filterMember').val('');
  528. $('.filterMember').trigger('change');
  529. $('.filterCausals').val('');
  530. $('.filterCausals').trigger('change');
  531. $('.filterSupplier').val('');
  532. $('.filterSupplier').trigger('change');
  533. var today = new Date().toISOString().split('T')[0];
  534. window.livewire.find(document.querySelector('[wire\\:id]').getAttribute('wire:id')).set('fromDate', today);
  535. window.livewire.find(document.querySelector('[wire\\:id]').getAttribute('wire:id')).set('toDate', today);
  536. }
  537. </script>
  538. @endpush