IGR datatable ordering based on role login

This commit is contained in:
Gowtham M 2025-02-14 12:36:43 +05:30
parent 47d49099ab
commit 64dbcb60b4
2 changed files with 3 additions and 1 deletions

0
., Normal file
View File

View File

@ -1935,6 +1935,7 @@
}
$(document).ready(function() {
var orderColumnIndex = <?php echo (session()->get('roleText') == 'Auditor') ? 6 : 0; ?>;
table = $('#view_inward_gate_register').DataTable({
dom: 'Blfrtip',
buttons: [
@ -1952,7 +1953,8 @@
[10, 20, 30, 50, "All"]
],
responsive: false,
ordering:false,
ordering:true,
order: [[parseInt(orderColumnIndex), 'desc']],
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon