Git Product home page Git Product logo

staff-hub's Introduction

Staff Hub ๐Ÿ’ป

[Unit 12, SQL - Employee Management System Assignment]

License: MIT


Description ๐Ÿ“Œ

This is a command-line application that manages a company's employee database using Node.js, Inquirer, and MySQL.

It follows a content management systems (CMS) interface that allows non-developers to easily view and interact with information stored in the database.

The application has the following appearance:

image16_appearance

A walkthrough video that demonstrates the features and functionalities of this employee tracker can be viewed by clicking the following links:

The application files can be accessed on my Github repository.


Table of Contents ๐Ÿ“Œ

  1. Title
  2. Description
  3. Installation
  4. Usage
  5. Technologies
  6. License
  7. Contributing
  8. Tests
  9. Credits
  10. Author
  11. Questions

Installation ๐Ÿ“Œ

  • Clone my repository on GitHub.

  • On Visual Studio Code:

    • Open the cloned file.
    • Create your gitignore and .env files.
    • Check the dependencies and dev dependencies needed on package.json.
  • To set up all the existing npm packages, run npm init.

  • To install the dependencies on the node_modules folder, run npm install or

    • npm i mysql2 to install MySQL2,
    • npm i inquirer to install Inquirer,
    • npm i node to install Node.js, and
    • npm i console.table to install console.table.
  • Run MySQL by entering the following:

    mysql -u root -p
    
  • Create the schema.sql tables and pre-populate the database with the data found in the seeds.sql files.

  • To invoke the application, run

    npm start
    

Usage ๐Ÿ“Œ

Please see the walk-through demonstration videos, descripton, and features and functionalities sections.

Features and Functionalities ๐Ÿ”Œ

  1. When the user starts the application, the user is presented with the following options:
    • view all departments,
    • view all roles,
    • view all employees,
    • add a department,
    • add a role,
    • add an employee,
    • update an employee role,
    • update an employee's manager,
    • delete a department,
    • delete a role,
    • delete an employee,
    • view employees by manager,
    • view employees by role,
    • view employees by department, and
    • view a department budget.

image1_banner-and-prompts

VIEW ALL

  1. By clicking the correct prompt, a user can view all departments, all roles, or all employees.

View All Departments

  1. When the user chooses to view all departments, the user is presented with a formatted table showing department names and department ids.

image2_view-all-depts

View All Roles

  1. When the user chooses to view all roles, the user is presented with the job title, role id, the department the role belongs to, and the salary for the role.

image3_view-all-roles

View All Employees

  1. When the user chooses to view all employees, the user is presented with a formatted table showing employee data, including employee ids, first names, last names, job titles, departments, salaries, and managers the the employees report to.

image4_view-all-employees

ADD

  1. A user can add a department, a role, or an employee.

Add a Department

  1. When the user chooses to add a department, the user is prompted to enter the name of the department and the department is added to the database.

image5_add-dept

Add a Role

  1. When the user chooses to add a role, the user is prompted to enter the name, salary, and department for the role and the role is added to the database.

image6_add-role

image7_add-role2

Add an Employee

  1. When the user chooses to add an employee, the user is prompted to enter the employeeโ€™s first name, last name, role, and manager, and the employee is added to the database.

image8_add-employee

UPDATE

  1. A user can update an employee role or manager.

Update a Role

  1. When the user chooses to update an employee role, the user is prompted to select an employee to update and their new role, and this information is updated in the database.

image9_update-roll

Update a Manager

  1. When the user chooses to update an employee's manager, the user is prompted to select an employee to update and their new manager, and this information is updated in the database.

image10_update-manager

DELETE

  1. A user can delete a department, a role, or an employee.

Delete a Department

  1. When a user chooses to delete a department, the user is prompted to select the department and this information is updated in the database.

image13_delete-dept

Delete a Role

  1. When the user chooses to delete a role, the user is prompted to select the role and this information is updated in the database.

image12_delete-role

Delete an Employee

  1. When the user chooses to delete an employee, the user is prompted to select the employee and this information is updated in the database.

image11_delete-employee

VIEW EMPLOYEES BY

  1. A user can view employees by manager, by role, or by department.

(Note: Only rank-and-file employees are shown in the employee list when the employees are viewed by manager or by role.)

View by Manager

  1. When the user chooses to view employees by manager, the user is presented with a formatted table showing the (rank and file) employees who report to the said manager, and their data which include their employee ID, first names, and last names.

View by Role

  1. When the user chooses to view employees by role, the user is presented with a formatted table showing the (rank and file) employees who perform the said role, and their data which include their employee ID, first names, and last names.

View by Department

  1. When the user chooses to view employees by department, the user is presented with a formatted table showing all employees in the said department (i.e., managerial and rank and file) and their employee data which include their employee ID, first names, last names, title, and salary.

image14_view-employees-by-mngr-role-dept png

VIEW A DEPARTMENT BUDGET

  1. A user can view the budget of a department.

View a Department budget

  1. When the user chooses to view the budget of a department, the user is prompted to select the department and is presented with the total utilized budget of a department, which is the combined salaries of all employees in that department.

image15_view-dept-budget


Technologies

  1. Javascript
  2. MySQL
  3. Node.js
  4. Inquirer

License ๐Ÿ“Œ

License used for this project - MIT

For more information on the above license and other license types, please see the following websites:


Contributing ๐Ÿ“Œ

To contribute to this application, please email the author for guidelines.


Tests ๐Ÿ“Œ

The application and its functionalities are tested manually using Visual Studio Code.


Credits ๐Ÿ“Œ

The following were consulted and used in the development of this application:

  • UCI Boot Camp study materials, videos, and internet resources on MySQL, Node.js, and Inquirer.
  • Jeff Howell and Mike Scharf for the homework walk-through videos (Thanks for putting them together and sharing them in the meeting room. They are a big help!).
  • The grader for my Social Media API assignment, whose comments encouraged me to plow through with my employee tracker app -- an assignment I considered to be one of the hardest and most tedious to do -- and not give up and submit an unfinished work. The grader also taught me the standard that I should keep when writing my README files. Thank you!
  • mySQL
  • Node.js
  • npmjs packages and documentations on MySQL2, Node.js, Inquirer, and Express.js.
  • Screencastify

Author ๐Ÿ“Œ

Jane Tiglao


Questions ๐Ÿ“Œ

For questions or issues, please contact:

staff-hub's People

Contributors

jbtiglao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.