function action(choice) {
    switch (choice) {
        case "View All Departments":
            viewDepartments();
            break;
          
        case "View All Roles":
            viewRoles();
            break;
            
        case "View All Employees":
            viewEmployees();
            break;
            
        case "Add a Department":
            addDepartment();
            break;

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

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

        case "Update Employee Roles":
            updateERoles();
            break;

        default:
            console.log("Exit Option has been selected.");
            db.end();
            break;
    }
}
// function to switch between actions on the users choice
function to switch between actions on the users choice
function to switch between actions on the users choice
function action(choice) {
    switch (choice) {
        case "View All Departments":
            viewDepartments();
            break;
        case "View All Roles":
            viewRoles();
            break;
        case "View All Employees":
            viewEmployees();
            break;
        case "Add a Department":
            addDepartment();
            break;
        case "Add a Role":
            addRole();
            break;
        case "Add an Employee":
            addEmployee();
            break;
        case "Update Employee Roles":
            updateERoles();
            break;
        default:
            console.log("Exit Option has been selected.");
            db.end();
            break;
    }
}
function action ( choice ) { switch ( choice ) { case "View All Departments" : viewDepartments ( ) ; break ; case "View All Roles" : viewRoles ( ) ; break ; case "View All Employees" : viewEmployees ( ) ; break ; case "Add a Department" : addDepartment ( ) ; break ; case "Add a Role" : addRole ( ) ; break ; case "Add an Employee" : addEmployee ( ) ; break ; case "Update Employee Roles" : updateERoles ( ) ; break ; default : console . log ( "Exit Option has been selected." ) ; db . end ( ) ; break ; } }
function to switch between actions on the users choice
function to switch between actions on the users choice