Here is the code. Please help. thanks
"use strict";
load_data();
function load_data(status = '',requests='') {
var table = $('#maintable').DataTable({
processing : true,
serverSide : true,
ajax : {
url : $('#maintable').attr('data-url'),
data : {status : status, requested : requests}
},
columns : [
{data : 'id', name : 'id'},
{data : 'image', name : 'image'},
{data : 'visitor_id', name : 'visitor_id'},
{data : 'name', name : 'name'},
{data : 'employee_id', name : 'employee_id'},
{data : 'date', name : 'date'},
{data : 'checkout', name : 'checkout'},
{data : 'status', name : 'status'},
{data : 'action', name : 'action'},
],
"ordering" : false
});
let hidecolumn = $('#maintable').data('hidecolumn');
if(!hidecolumn) {
table.column( 5 ).visible( false );
}
}
$('#maintable').on('draw.dt', function () {
$('[data-toggle="tooltip"]').tooltip();
})
This is i what i get whenever i load this page and it refuses to load the needed data to the table. Please what is wrong? Waiting for your solutions…thanks