async function mainPrompt() {
	
	// Prompt user for main prompt
	const { menuAction } = await inquirer.prompt(prompts.mainPrompt);
	
	switch (menuAction) {
		
		case "View all employees":
			viewAllEmployees();
			break;

		case "View all employees by department":
			viewEmployeesByDepartment();
			break;

		case "View all employees by manager":
			viewAllEmployeesByManager();
			break;

		case "View all roles":
			viewAllRoles();
			break;

		case "View all departments":
			viewAllDepartments();
			break;

		case "Add Employee":
			addEmployee();
			break;

		case "Add Department":
			addDepartment();
			break;

		case "Add Role":
			addRole();
			break;

		case "Update employee role":
			updateEmployeeRole();
			break;

		case "Update employee manager":
			updateEmployeeManager();
			break;

		case "Remove Employee":
			removeEmployee();
			break;

		case "Exit":
			db.closeConnection();
			console.log("Connection closed!");
			break;
	}
}
// Main prompt for user to choose action
Main prompt for user to choose action
Main prompt for user to choose action
async function mainPrompt() {
	const { menuAction } = await inquirer.prompt(prompts.mainPrompt);
	switch (menuAction) {
		case "View all employees":
			viewAllEmployees();
			break;
		case "View all employees by department":
			viewEmployeesByDepartment();
			break;
		case "View all employees by manager":
			viewAllEmployeesByManager();
			break;
		case "View all roles":
			viewAllRoles();
			break;
		case "View all departments":
			viewAllDepartments();
			break;
		case "Add Employee":
			addEmployee();
			break;
		case "Add Department":
			addDepartment();
			break;
		case "Add Role":
			addRole();
			break;
		case "Update employee role":
			updateEmployeeRole();
			break;
		case "Update employee manager":
			updateEmployeeManager();
			break;
		case "Remove Employee":
			removeEmployee();
			break;
		case "Exit":
			db.closeConnection();
			console.log("Connection closed!");
			break;
	}
}
async function mainPrompt ( ) { const { menuAction } = await inquirer . prompt ( prompts . mainPrompt ) ; switch ( menuAction ) { case "View all employees" : viewAllEmployees ( ) ; break ; case "View all employees by department" : viewEmployeesByDepartment ( ) ; break ; case "View all employees by manager" : viewAllEmployeesByManager ( ) ; break ; case "View all roles" : viewAllRoles ( ) ; break ; case "View all departments" : viewAllDepartments ( ) ; break ; case "Add Employee" : addEmployee ( ) ; break ; case "Add Department" : addDepartment ( ) ; break ; case "Add Role" : addRole ( ) ; break ; case "Update employee role" : updateEmployeeRole ( ) ; break ; case "Update employee manager" : updateEmployeeManager ( ) ; break ; case "Remove Employee" : removeEmployee ( ) ; break ; case "Exit" : db . closeConnection ( ) ; console . log ( "Connection closed!" ) ; break ; } }
Main prompt for user to choose action
Main prompt for user to choose action
// Prompt user for main prompt