function mainMenuPrompt() {
  console.log("Welcome to the Employee Tracker")
  inquirer
    .prompt({
      name: "action",
      type: "rawlist",
      message: "What would you like to do?",
      choices: [
        "View All Employees",
        "View Departments",
        "View Roles",
        "Update Employee Role",
        "Add New Employee",
        "Add New Role",
        "Add New Department"
      ]
    })
    .then(function (answer) {
      switch (answer.action) {
        case "View All Employees":
          viewAllEmployees();
          break;

        case "View Departments":
          viewDepartment();
          break;

        case "View Roles":
          viewRoles();
          break;

        case "Update Employee Role":
          UpdateRole();
          break;

        case "Add New Employee":
          addNewEmployee();
          break;

        case "Add New Role":
          addNewRole();
          break;

        case "Add New Department":
          addNewDepartment();
          break;
      }
    });
}
// Main menu prompt for main menu of employee tracker
Main menu prompt for main menu of employee tracker
Main menu prompt for main menu of employee tracker
function mainMenuPrompt() {
  console.log("Welcome to the Employee Tracker")
  inquirer
    .prompt({
      name: "action",
      type: "rawlist",
      message: "What would you like to do?",
      choices: [
        "View All Employees",
        "View Departments",
        "View Roles",
        "Update Employee Role",
        "Add New Employee",
        "Add New Role",
        "Add New Department"
      ]
    })
    .then(function (answer) {
      switch (answer.action) {
        case "View All Employees":
          viewAllEmployees();
          break;
        case "View Departments":
          viewDepartment();
          break;
        case "View Roles":
          viewRoles();
          break;
        case "Update Employee Role":
          UpdateRole();
          break;
        case "Add New Employee":
          addNewEmployee();
          break;
        case "Add New Role":
          addNewRole();
          break;
        case "Add New Department":
          addNewDepartment();
          break;
      }
    });
}
function mainMenuPrompt ( ) { console . log ( "Welcome to the Employee Tracker" ) inquirer . prompt ( { name : "action" , type : "rawlist" , message : "What would you like to do?" , choices : [ "View All Employees" , "View Departments" , "View Roles" , "Update Employee Role" , "Add New Employee" , "Add New Role" , "Add New Department" ] } ) . then ( function ( answer ) { switch ( answer . action ) { case "View All Employees" : viewAllEmployees ( ) ; break ; case "View Departments" : viewDepartment ( ) ; break ; case "View Roles" : viewRoles ( ) ; break ; case "Update Employee Role" : UpdateRole ( ) ; break ; case "Add New Employee" : addNewEmployee ( ) ; break ; case "Add New Role" : addNewRole ( ) ; break ; case "Add New Department" : addNewDepartment ( ) ; break ; } } ) ; }
Main menu prompt for main menu of employee tracker
Main menu prompt for main menu of employee tracker