function userdata(json) {
    if (json != '') {
      // console.log("Admin", json);
      let rows = json.map((ob, index) => {
        // let date = ob.jc_created_date.split(" ");
        let actionHtml = `
      <a data-toggle="modal" data-target="#myModal2" attr_id="${ob.id}" onclick="getDetails('${ob.id}')"> <i class="fa fa-edit" style="font-size:10px;color:blue" title="Edit"> </i> </a>
      <a onclick="deleteRecord('${ob.id}')"> <i class="fa fa-trash text-danger" style="font-size:10px" aria-hidden="true" title="Delete"></i>
      `;
        let row = [(index + 1), ob.f_name + " " + ob.l_name, ob.email, ob.password, ob.role_status, actionHtml];
  
        // let row = [(index + 1), ob.internal_order_id, date[0], ob.title, ob.quantity, ob.remark, ob.sp_remark, actionHtml];
        return row;
      })
      // console.log(rows);
      table = $('#dataTableuser').DataTable();
      table.destroy();
      $('#dataTableuser').DataTable({
        data: rows,
      });
    }
  }
// display employee records in tabular format using ajax
display employee records in tabular format using ajax
display employee records in tabular format using ajax
function userdata(json) {
    if (json != '') {
      let rows = json.map((ob, index) => {
        let actionHtml = `
      <a data-toggle="modal" data-target="#myModal2" attr_id="${ob.id}" onclick="getDetails('${ob.id}')"> <i class="fa fa-edit" style="font-size:10px;color:blue" title="Edit"> </i> </a>
      <a onclick="deleteRecord('${ob.id}')"> <i class="fa fa-trash text-danger" style="font-size:10px" aria-hidden="true" title="Delete"></i>
      `;
        let row = [(index + 1), ob.f_name + " " + ob.l_name, ob.email, ob.password, ob.role_status, actionHtml];
        return row;
      })
      table = $('#dataTableuser').DataTable();
      table.destroy();
      $('#dataTableuser').DataTable({
        data: rows,
      });
    }
  }
function userdata ( json ) { if ( json != '' ) { let rows = json . map ( ( ob , index ) => { let actionHtml = ` ${ ob . id } ${ ob . id } ${ ob . id } ` ; let row = [ ( index + 1 ) , ob . f_name + " " + ob . l_name , ob . email , ob . password , ob . role_status , actionHtml ] ; return row ; } ) table = $ ( '#dataTableuser' ) . DataTable ( ) ; table . destroy ( ) ; $ ( '#dataTableuser' ) . DataTable ( { data : rows , } ) ; } }
display employee records in tabular format using ajax
display employee records in tabular format using ajax
// console.log("Admin", json); // let date = ob.jc_created_date.split(" "); // let row = [(index + 1), ob.internal_order_id, date[0], ob.title, ob.quantity, ob.remark, ob.sp_remark, actionHtml]; // console.log(rows);