utils/questions.js
// Questions for add team or finish building team
Questions for add team or finish building team
Questions for add team or finish building team
function askmenu(team) {
    inquirer.prompt(menuquestion)
        .then((response) => {
            switch (response.Action1) {
                case 'Finish Building Team':
                    makehtml(team);
                    break;
                case 'Add Engineer':
                    quest = NewEmployeequestions.concat(Engineerquestions)
                    inquirer.prompt(quest).
                        then((rep) => {
                            team.push(new Engineer(rep.EmployeeName, rep.EmployeeID, rep.EmployeeEmail, rep.GitUserName))
                            askmenu(team);
                        })
                    break;
                case 'Add Intern':
                    quest = NewEmployeequestions.concat(Internquestions)
                    inquirer.prompt(quest).
                        then((rep) => {
                            team.push(new Intern(rep.EmployeeName, rep.EmployeeID, rep.EmployeeEmail, rep.School))
                            askmenu(team);
                        })
                    break;
                default:
                    break;
            }
        })
    return (team)
}
function askmenu ( team ) { inquirer . prompt ( menuquestion ) . then ( ( response ) => { switch ( response . Action1 ) { case 'Finish Building Team' : makehtml ( team ) ; break ; case 'Add Engineer' : quest = NewEmployeequestions . concat ( Engineerquestions ) inquirer . prompt ( quest ) . then ( ( rep ) => { team . push ( new Engineer ( rep . EmployeeName , rep . EmployeeID , rep . EmployeeEmail , rep . GitUserName ) ) askmenu ( team ) ; } ) break ; case 'Add Intern' : quest = NewEmployeequestions . concat ( Internquestions ) inquirer . prompt ( quest ) . then ( ( rep ) => { team . push ( new Intern ( rep . EmployeeName , rep . EmployeeID , rep . EmployeeEmail , rep . School ) ) askmenu ( team ) ; } ) break ; default : break ; } } ) return ( team ) }
Questions for add team or finish building team
Questions for add team or finish building team