server.js
// function to handle adding new employee
function to handle adding new employee
function to handle adding new employee
function addEmployee() {
  inquirer
    .prompt([
      {
        name: "new_employee",
        type: "input",
        message: "What is the new employee name?"
      },
      {
        name: "role",
        type: "input",
        message: "What is their role?"
      },
    ])
    .then(function(answer) {
      connection.query(
        "INSERT INTO employee_list SET ?",
        {
          item_name: answer.new_employee,
          category: answer.role,
        },
        function(err) {
          if (err) throw err;
          console.log("Successful addition");
          start();
        }
      );
    });
}
function addEmployee ( ) { inquirer . prompt ( [ { name : "new_employee" , type : "input" , message : "What is the new employee name?" } , { name : "role" , type : "input" , message : "What is their role?" } , ] ) . then ( function ( answer ) { connection . query ( "INSERT INTO employee_list SET ?" , { item_name : answer . new_employee , category : answer . role , } , function ( err ) { if ( err ) throw err ; console . log ( "Successful addition" ) ; start ( ) ; } ) ; } ) ; }
function to handle adding new employee
function to handle adding new employee
// prompt for info about the new employee // when finished prompting, insert a new employee into the db with that info