Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
474cb1b
added my package.json
luizfroes Dec 11, 2021
1a5edf5
added my schema
luizfroes Dec 11, 2021
aefc6a8
Updated the schema
luizfroes Dec 11, 2021
8bfa5f2
added the seeds.js
luizfroes Dec 11, 2021
f2fdfab
added index file with comments
luizfroes Dec 11, 2021
1eeea79
added DB class
luizfroes Dec 11, 2021
e7c91c6
Added the opening question
luizfroes Dec 11, 2021
b6b099b
Added all if statements on index.js
luizfroes Dec 11, 2021
86cb92a
Added all questions
luizfroes Dec 11, 2021
da0caf1
Added inquirer questions to add
luizfroes Dec 11, 2021
e5905d4
Added new Db class and the while loop
luizfroes Dec 11, 2021
72ad2b6
Added add department option
luizfroes Dec 12, 2021
e9c6e9c
refactored some utils functions
luizfroes Dec 12, 2021
ad06fa5
Refactored some utils functions
luizfroes Dec 12, 2021
963c569
Added all the view options
luizfroes Dec 12, 2021
997c05c
refactored questions
luizfroes Dec 12, 2021
a2f5c74
refactored utils
luizfroes Dec 12, 2021
ca43eb7
refactored the code
luizfroes Dec 12, 2021
55fe8fe
refactored code and added delete options
luizfroes Dec 14, 2021
273e495
Added update options
luizfroes Dec 14, 2021
ab0cb55
added display employees by manager
luizfroes Dec 15, 2021
a9f0649
added view employees by department
luizfroes Dec 15, 2021
66fd501
added view employees by role option
luizfroes Dec 15, 2021
5ae4538
Installed dotenv package
luizfroes Dec 15, 2021
5d79440
refactored the code
luizfroes Dec 15, 2021
ba55cf1
Added the departments budget action
luizfroes Dec 16, 2021
a1dcb90
refactored the code and fixed some bugs
luizfroes Dec 17, 2021
9f45eaa
refactored
luizfroes Dec 17, 2021
63f6a36
added some validations
luizfroes Dec 20, 2021
2c0117b
Added the readme file content
luizfroes Dec 20, 2021
c7ec826
moving questions to utils
luizfroes Dec 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ dist

# TernJS port file
.tern-port

.env

.DS_store

.node_modules
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,80 @@
# employee-tracker
A command-line application to manage a company's employee database, using Node.js, Inquirer, and MySQL.
<h1>Employee Tracker</h1>

<h2>Table of Contents</h2>

- [Description](#description)
- [User Story](#user-story)
- [Technologies Used](#technologies-used)
- [Installation](#installation)
- [Usage](#usage)
- [Video Walkthrough](#video-walkthrough)
- [Questions](#questions)

## Description

Developers frequently have to create interfaces that allow non-developers to easily view and interact with information stored in databases. These interfaces are called **content management systems (CMS)**. That is exactly what Employee Tracker does. It a command-line application to manage a company's employee database, using Node.js, Inquirer, and MySQL.

## User Story

```md
GIVEN a command-line application that accepts user input
WHEN I start the application
THEN I am presented with the following options: view all departments, view all roles, view all employees, add a department, add a role, add an employee, and update an employee role
WHEN I choose to view all departments
THEN I am presented with a formatted table showing department names and department ids
WHEN I choose to view all roles
THEN I am presented with the job title, role id, the department that role belongs to, and the salary for that role
WHEN I choose to view all employees
THEN I am presented with a formatted table showing employee data, including employee ids, first names, last names, job titles, departments, salaries, and managers that the employees report to
WHEN I choose to add a department
THEN I am prompted to enter the name of the department and that department is added to the database
WHEN I choose to add a role
THEN I am prompted to enter the name, salary, and department for the role and that role is added to the database
WHEN I choose to add an employee
THEN I am prompted to enter the employee’s first name, last name, role, and manager, and that employee is added to the database
WHEN I choose to update an employee role
THEN I am prompted to select an employee to update and their new role and this information is updated in the database
```

## Technologies Used

#### Languages

- JavaScript
- JQuery

#### Packages used

- Node.Js
- Inquirer
- Mysql2
- Dotenv
- Console.table

## Installation

To install the application follow the steps below:

```
npm install
```

## Usage

To use the application follow the steps below:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this application requires any user to connect to the database, it would be good to include a step to tell them where to find the script to create the database and how to run this.

```
npm run start
```

## Video Walkthrough

Click [here](https://drive.google.com/file/d/1vY8UyUaPKDp7BSeCC6yc-TZ2E3R619NM/view?usp=sharing) to access the Video Walkthrough.

## Questions

If you have any question or suggestion, please fell free to get in touch with me by:

Email: [luizfroes@gmail.com](mailto:luizfroes@gmail.com)

GitHub: [luizfroes](https://github.com/luizfroes)
Loading