let clientListController = () => {
//clear any previous table data
$('#table-clients').html("
Client Name
Options
");
//clear any previous messages
$('#message-clientlist').html("");
$('#message-clientlist').removeClass();
// there is no data to error trap here. Step not needed.
// there is no data to serialize here. Step not needed.
// next thing to do is to write an ajax call
$.ajax({
"url": endpoint01 + "/clients",
"method": "GET",
"success": (results) => {
console.log(results); // best practice for students
for(let i=0; i< results.length;i++){
let clientname = results[i]['lastname'] + ", " + results[i]['firstname'];
let clientid = results[i]['clientid'];
let txttablerow = `