Coder Social home page Coder Social logo

employee-tracker's Introduction

Employee Tracker

Github License

Description

This is command-line application for tracking, managing, and updating departments, roles, and employees for an example company. This content management system show cases inquirer and mysql query integration. This command line based utility that prompts the user to select from a list of options. The options listed allow the user to view a selected table(s), add/update a given column(s) in a table, and remove/delete elements in a table. When the user starts the application, they are presented with the following options: view all employees, add emloyee, update emloyee role, update employee manager, view all roles, add role, view all departments, add department, view employees by manager, view all employees for a department, remove department, remove role, remove employee, view total department budget, and quit.

  • When a user chooses to view all departments, a formatted table showing department names and ids.
  • When a user chooses to view all roles, a table with job title, role id, department that belongs to that role, and salary for that role is displayed.
  • When a user chooses to view all employees, a formatted table shows employee data, including employee ids, first names, last names, job titles, departments, salaries, and managers of the employee.
  • When a user chooses to add a department, they are prompted to enter a name for a department that is then added to the database.
  • When a user chooses to add a role, they are prompted for the name, salary, and department for the role that's then added to the database.
  • When a user chooses to add an employee, they are prompted for the employee's first name, last name, role, and manger, which is then added to the database.
  • When a user chooses to update an employee's role, they are prompted to select an employee and their new role, which is then updated in the database.
  • When a user chooses to update an employee's manager, they are prompted to select an employee and the other existing employee that will be their manager, which is then updated in the database.
  • When a user chooses to view all employees for a department, they are prompted to select a department which returns a formatted table with all employee information joined by all role information for employees under that department.
  • When a user chooses to remove a department, they are prompted for the department name, and the database removes that department and deletes all associated roles and employees under that department as well.
  • When a user chooses to remove a role, they are prompted for the role name, then the role is removed from the database and the employee table is updated with null values. The employee table can then be updated to add a new role for employees after this, or the user can remove the employee, whichever the user wants.
  • When a user chooses to remove an employee, they are prompted for the employee's first and last name, which then deletes the emloyee from the database.

Table of Contents

Installation

  1. To install just clone this repo:
git clone [email protected]:hculp/employee-tracker.git
  1. Install the required packages (inquier, dotenv, and mysql2) from the given package.json:
npm i
  1. Setup and seed the mysql database with the given schema and seeds files in the db folder. Make sure to create a .env file with variables DB_NAME, DB_USER, DB_PASSWORD with your mysql database info.

Usage

To use the employee tracker, use node command:

npm start

Follow the prompts and adjust your inputs into tables as needed. Make sure to use the id column and not the index column from the tables when asked for any department, role, manager id

Here is a link to a demo video using the command line utility.

Contribution

Contribution falls under open ISC license.

Tests

There are no given tests here, but you should craft them for your given use and adjustments to any base code here.

Questions

Send any questions or feedback to the following contacts:

License

Copyright (C) 2023 Houston Culpepper.

Distributed under the ISC License.

Link to ISC license

employee-tracker's People

Contributors

hculp 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.