Update users.blade.php

This commit is contained in:
Julian Prieber 2023-07-22 16:15:58 +02:00
parent 15e05aced0
commit 98d16cc7fd
1 changed files with 12 additions and 10 deletions

View File

@ -170,8 +170,8 @@
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
@push('sidebar-scripts')
<script defer>
const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;
const comparer = (idx, asc) => (a, b) =>
@ -179,6 +179,7 @@
v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
)(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));
document.addEventListener("DOMContentLoaded", function() {
// Find the table and its headers
const table = document.querySelector('table');
const headers = table.querySelectorAll('th');
@ -216,5 +217,6 @@
}));
});
</script>
@endpush
@endsection