Storefront Database for Customers, Managers, and Supervisors
- You will need a running MySQL Database, including user and password info.
Refer to the includedkey.js
file and the dotenv npm documentation.
- Included in the repository are
.sql
files to setup the database & tables, including some mock data.
- Customer is presented with a table of products that are in stock, including ID#s & prices.
- Customer inputs a product ID and a quantity.
- With valid input, database will deplete stock quantity and add to the products sales value.
- If order can be fulfilled, message will be displayed with the order's total cost.
Manager is presented with options menu
- Displays table of all Products
- Displays table of Products with < 5 items left
- Prompts manager for product's ID and a quantity to add to stock.
- With valid input, database is updated to add inventory.
- Prompts manager for new product's
name
,price
, initialstock quantity
, and thedepartment
to which the product belongs. - With valid input, a new product is inserted into the database.
Supervisor is presented with options menu
- Displays table that summarizes the profits (total sales less overhead) of each department.
- Prompts supervisor for new department's
name
and itsover head cost
value. - With valid input, a new department is inserted into database.