index.js
//Asks the followup question for when view is selected
Asks the followup question for when view is selected
Asks the followup question for when view is selected
async function viewSelect() {
    await inquirer.prompt(
        {
            type: "list",
            message: enquiries.view.question,
            choices: [enquiries.view.a, enquiries.view.b, enquiries.view.c],
            name: "view"
        }
    )
        .then(function (response) {
            switch (response.view) {
                case enquiries.view.a:
                    database.viewAll('departments')
                    break;
                case enquiries.view.b:
                    database.viewAll('roles')
                    break;
                case enquiries.view.c:
                    database.viewAll('employees')
                    break;
            }
        })
    startQuestioning();
}
async function viewSelect ( ) { await inquirer . prompt ( { type : "list" , message : enquiries . view . question , choices : [ enquiries . view . a , enquiries . view . b , enquiries . view . c ] , name : "view" } ) . then ( function ( response ) { switch ( response . view ) { case enquiries . view . a : database . viewAll ( 'departments' ) break ; case enquiries . view . b : database . viewAll ( 'roles' ) break ; case enquiries . view . c : database . viewAll ( 'employees' ) break ; } } ) startQuestioning ( ) ; }
Asks the followup question for when view is selected
Asks the followup question for when view is selected