As a manager a user might want to generate a webpage that displays one's team's basic info so that a user have quick access to their emails and GitHub profiles.
Hereby I would like to present the potential users with a Node.js command-line application that take in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person.
This command-line application create classes for each team member and export them.
* The first class is an Employee
parent class with the following properties and methods:
* name
* id
* email
* getName()
* getId()
* getEmail()
* getRole()
—returns 'Employee'
* The other three classes will extend Employee
.
* In addition to Employee
's properties and methods, Manager
will also have the following:
* officeNumber
* getRole()
—overridden to return 'Manager'
* In addition to Employee
's properties and methods, Engineer
will also have the following:
* github
—GitHub username
* getGithub()
* getRole()
—overridden to return 'Engineer'
* In addition to Employee
's properties and methods, Intern
will also have the following:
* school
* getSchool()
* getRole()
—overridden to return 'Intern'
- Code were written in
index.js
that uses inquirer to gather information about the development team members and creates objects for each team member using the correct classes as blueprints.- When a user starts the application then they are prompted to enter the team manager’s:
- Name
- Employee ID
- Email address
- Office number
- When a user enters those requirements then the user is presented with a menu with the option to:
- Add an engineer
- Add an intern
- Finish building the team
- When a user selects the engineer option then a user is prompted to enter the following and then the user is taken back to the menu:
- Engineer's Name
- ID
- GitHub username
- When a user selects the intern option then a user is prompted to enter the following and then the user is taken back to the menu:
- Intern’s name
- ID
- School
- When a user decides to finish building their team then they exit the application, and the HTML is generated.
- When a user starts the application then they are prompted to enter the team manager’s:
- Call the
render
function and pass in an array containing all employee objects;- The
render
function will generate and return a block of HTML including templated divs for each employee!
- The
A sample HTML file generated using the application: output\teamprofile.html
The following image shows a mock-up of the generated HTML’s appearance and functionality: