bamazon-cli
Version:
Find everything you need at Bamazon! Bamazon, the node cli shopping app is an interactive app which allows the users to purchase items as a customer, view, track and update the product inventory as a manager, and track the total sales by department as a s
85 lines (44 loc) • 5.26 kB
Markdown
# Welcome to BAMAZON
Find everything you need at Bamazon! Bamazon, the node cli shopping app is an interactive app which allows the users to purchase items as a customer, view, track and update the product inventory as a manager, and track the total sales by department as a supervisor.
### Getting Started
If you are downloading the npm package, run the following command in your terminal
```
sudo npm install bamazon-cli -g
```

### Commands
Once you download the bamazon-cli package enter the commands listed in the example below to explore bamazon. Once user enters bamazon in command line and hits enter, user can enter as customer, manager or supervisor.

##### Customer Portal
The customer interface allows the user to view the current inventory of store items: item ID, descriptions, and price. The user is then able to purchase one of the existing items by choosing the item name and the desired quantity. If the selected quantity is currently not in stock, the user is alerted insufficient quantity. If the selected quantity is currently in stock, the user's order is fulfilled, displaying the purchase price and updating the store database.





##### Manager Portal
The manager interface presents a list of five options:
1. View Products for Sale: If the manager selects View Products for Sale, it lists all of the products in the store including all of their details.
2. View Low Inventory: If the manager selects View Low Inventory, it lists all the products with less than five items in its stock quantity column.
3. Add to Inventory: If the manager selects Add to Inventory, it allows the manager to select a product and add inventory.
4. Add New Product: If the manager selects Add New Product, it allows the manager to add a new product to the store.
5. Exit: If the manager selects Exit, it ends the session and doesn't go back to the menu.





##### Supervisor Portal
The supervisor interface presents a list of three options:
1. View Product Sales by Department: If the supervisor selects View Product Sales by Department, it lists the Department Sales and calculates the total sales from the overhead cost and product sales. User is also given 3 options, Yes, No and Change to Customer/Manager. If the user wants to exit, user can click No. If the user clicks yes, user can create new department. If user clicks on Change to Customer/Manager, the user can choose to use the customer or manager interface.
2. Create New Department: If the supervisor selects Create New Department, it allows the manager to create a new department and input current overhead costs and product sales. User is also given 3 options, Yes, No and Change to Customer/Manager. If the user wants to exit, user can click No. If the user clicks yes, user can view product sales by department. If user clicks on Change to Customer/Manager, the user can choose to use the customer or manager interface.
3. Exit: If the supervisor selects Exit, it ends the session and doesn't go back to the menu.







### NPMs Used
inquirer, mysql, chalk, cli-table-redemption