first commit
This commit is contained in:
45
public/themes/tailwind/js/cms/companies/show-log.js
Normal file
45
public/themes/tailwind/js/cms/companies/show-log.js
Normal file
@@ -0,0 +1,45 @@
|
||||
$(document).ready( function () {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
var allUserAccessLogsListTableUrl = $("#allUserAccessLogsListTable").attr('data-ajax-url');
|
||||
var allUserAccessLogsListTableEmptyText = $("#allUserAccessLogsListTable").attr('data-empty-text');
|
||||
$("#allUserAccessLogsListTable").DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: allUserAccessLogsListTableUrl,
|
||||
type: 'post',
|
||||
"dataSrc": function ( json ) {
|
||||
for (var i = 0; i < json.data.length; i++) {
|
||||
$.each( json.data[i], function( key, value ) {
|
||||
json.data[i][key] = value ? value : '-';
|
||||
});
|
||||
}
|
||||
|
||||
return json.data;
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{data: 'email', name: 'users.email'},
|
||||
{data: 'date', name: 'user_access_logs.created_at'},
|
||||
{data: 'time', name: 'user_access_logs.created_at'},
|
||||
{data: 'event', name: 'user_access_logs.event'},
|
||||
{data: 'description', name: 'user_access_logs.description'},
|
||||
{data: 'status', name: 'user_access_logs.status'},
|
||||
],
|
||||
order: [[1, "desc"]],
|
||||
searchDelay: 500,
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
"emptyTable": allUserAccessLogsListTableEmptyText
|
||||
// Add more text customizations if needed
|
||||
}
|
||||
});
|
||||
} );
|
||||
Reference in New Issue
Block a user