Requirement Specifications - McGill-ECSE321-Winter2022/project-group-group-08 GitHub Wiki

User Accounts

Detailed use case: Lifecycle of an Customer Account

Actors: Employee, Customer

Preconditions:

1.	N/A

Main Scenario:

1.	Employee logins to their account
2.	Employee creates account for a customer
3.	Customer logins to their account
4.	Customer deletes their account

Alternatives:
1a: Employee's account is not valid
 1a1: Employee cannot create account for customer
2b: Customer account is already created
3a: Customer account is banned
 3a1: Customer cannot login


Store Hours

Detailed use case: Store owner changing store hours

Scenario: The store owner is trying to change the store's hours

Actors: Owner, Grocery Store System

Preconditions:

1.	N/A

Main Scenario:

1.	Owner logins
2.	Owner clicks on the store tab
3.	Owner edits the respective textfield (each weekday has a specific textfield)
4.	Owner confirms the information
5.	The system updates the store's hours
6.	The system brings the owner back to the store tab

Alternatives:
3a: The information entered is in the wrong input (ie. 6:00-45:00)
 3a1: The system prompts the owner to enter the hour information again in all the textfields that have incorrect input
4a: The owner does not confirm the information
 4a1: Go back to 3

Store Items

Detailed use case: Employees managing schedule

Scenario: The owner is trying to add an item

Actors: Owner, Grocery Store System

Preconditions:

1.	N/A

Main Scenario:

1.	Owner logins
2.	Owner clicks on the add tab
3.	Owner fills in the necessary information of that item (names, price, quantity, description etc.)
4.	Owner confirms the information
5.	The system adds the item
6.	The system brings the owner to the inventory page

Alternatives:
1a: The information entered contains the wrong credentials
 1a1: The system prompts the owner to enter the account information again
3a: Not all necessary information are filled in correctly
 3a1: The system highlights the information that contains errors
4a: The owner does not confirm the information
 4a1: The system brings the owner back to the adding page
5a: The item already exists and the system prompts the owner to change the item name
 5a1: back to step 3


Working Hours

Detailed use case: Employees managing schedule

Scenario: The employee is trying to view their working schedule

Actors: Employee, Grocery Store System

Preconditions:

1.	The account is an employee’s account
2.	The employment is not terminated

Main Scenario:

1.	Employee logins
2.	Employee clicks on the account tab
3.	Employee selects the range of date which they want to know their working hours
4.	The system finds the employee’s schedule
5.	The system displays the employee’s schedule

Alternatives:
1a: The information entered contains the wrong credentials
 1a1: The system prompts the owner to enter the account information again
3a: The employee entered a later start date than the desired end date
4a: The schedule for the dates entered have not yet been set
 4a1: The system shows a grayed out column on the days that the schedule has not been set


Transactions

Detailed use case: Customer wants to select and buy items

Scenario: Any customer should be able to make a transaction. They will need to select an item then add it into the cart. Once every item the customer wants is in the cart, they will need to select the order type and make a payment. A unique transaction info will be generated automatically. Actors: Customer, Grocery Store System

Main Scenario:

1.	The customer selects wanted item. 
2.	The customer adds the item into cart. 
3.	The customer chooses type of order.
4.	The system generates a receipt for the customer. 
5.	The customer confirms the receipt.
6.	The customer makes a transaction for the order. 

Alternatives:
1a: The wanted item must be selected while adding to cart
 1a. The system shall display: “Please select an item”
 1b. Return to step 1
2a: The customer must choose the type of the order
 2a. The system shall display: “Please select a preferred order type”
 2b. Return to step 3
3a: The confirmation of receipt cannot be empty
 3a1: The system shall display: “Please confirm your receipt”
 3a2: Return to step 5