Global

Members

An array of menu items.
Type:
Source:
Array containing the Entree menu items.
Type:
  • Array.<{name: string, src: string, key: number, id: number}>
Source:
The menu list with an array of menu items containing the item name, image source, key, and id.
Source:
An array of menu items with their corresponding `AddMenuItem` component.
Type:
  • Array.<JSX.Element>
Source:
Array containing the menu items components.
Type:
  • Array.<JSX.Element>
Source:
The list of menu items with an AddMenuItem component for each item.
Source:

Methods

AddMenuItem(props) → {any}

This function component renders a food category onto the CustomerOrder screen
Parameters:
Name Type Description
props any The props for the AddMenuItem component
Properties
Name Type Description
item any The item object that contains information about the menu item being added
Source:
Returns:
A component to render a food category onto the CustomerOrder screen
Type
any

AddMenuItem(props) → {any}

This function component renders a food category onto the CustomerOrder screen
Parameters:
Name Type Description
props any The props for the AddMenuItem component
Properties
Name Type Description
item any The item object that contains information about the menu item being added
Source:
Returns:
A component to render a food category onto the CustomerOrder screen
Type
any

Beverages() → {JSX.Element}

The Beverages page component.
Source:
Returns:
- The Beverages page UI.
Type
JSX.Element

CategoryItem(props) → {JSX.Element}

A React component that renders a food category onto the CustomerOrder screen.
Parameters:
Name Type Description
props Object The props object containing the item property.
Properties
Name Type Description
item Object The food category item to be rendered.
Properties
Name Type Description
name string The name of the food category.
title string The title of the food category.
src string The URL of the image for the food category.
Source:
Returns:
A component to render a food category onto the CustomerOrder screen.
Type
JSX.Element

CheckoutItem(props) → {JSX.Element}

A functional component to display an item in the checkout list.
Parameters:
Name Type Description
props Object The component's input props.
Properties
Name Type Attributes Default Description
itemName string The name of the item to be displayed.
count number The count of the item to be displayed.
price number The price of the item to be displayed.
excluded boolean <optional>
false Whether the item is excluded from the order.
excluded Array.<Object> An array of objects representing excluded items.
Properties
Name Type Description
name string The name of the excluded item.
onClick function The function to handle click event on the item.
cartID string The ID of the cart.
Source:
Returns:
- A component to display an item in the checkout list.
Type
JSX.Element

CheckoutPanel(props) → {JSX.Element}

Represents the checkout panel component.
Parameters:
Name Type Description
props object The props object containing the cart.
Source:
Returns:
The checkout panel component.
Type
JSX.Element

CustomerCheckOutItem(props) → {JSX.Element}

A React component that displays a single item in the checkout list for a customer.
Parameters:
Name Type Description
props Object The props object that contains the necessary information to render the component.
Properties
Name Type Description
itemName string The name of the item to display.
count number The number of items to display.
price number The price of the item to display.
cartID string The unique identifier of the item in the cart.
excluded Array.<Object> An array of items that are excluded from the original item.
removeFromCart function A function to remove the item from the cart when clicked.
Source:
Returns:
- Returns the JSX element to render the component.
Type
JSX.Element

CustomerCheckout(props)

Component for rendering and managing customer checkout
Parameters:
Name Type Description
props object Props object
Properties
Name Type Description
exampleProp string An example prop
Source:

CustomerNav(props) → {JSX.Element}

A navigation bar for the customer view.
Parameters:
Name Type Description
props Object The props object that contains the numberOfItems, title and navPage values.
Source:
Returns:
- A JSX element that represents the navigation bar for the customer view.
Type
JSX.Element

CustomerRoutes() → {JSX.Element}

Defines the routes for the customer section of the app.
Source:
Returns:
The routes for the customer section of the app.
Type
JSX.Element

DatabaseTablePane(props) → {JSX.Element}

React functional component that displays a database table.
Parameters:
Name Type Description
props Object Component props.
Properties
Name Type Description
data Array An array of objects representing rows in the table.
handleOnClick function Function to be called when a row in the table is clicked.
Source:
Returns:
- JSX table element representing the database table.
Type
JSX.Element

EmployeeNav(props) → {JSX.Element}

React functional component representing the navigation bar for employees.
Parameters:
Name Type Description
props object The properties of the component.
Source:
Returns:
- A JSX element representing the employee navigation bar.
Type
JSX.Element

EmployeeRoutes() → {JSX.Element}

Defines the routes for the employee section of the app.
Source:
Returns:
The routes for the employee section of the app.
Type
JSX.Element

Entree() → {JSX.Element}

The Entree component.
Source:
Returns:
Type
JSX.Element

FormGenerator(fields, onSubmit) → {JSX.Element}

A component that generates a form based on the given fields and handles form submission.
Parameters:
Name Type Description
fields Array An array of field objects that contain information about the form fields.
onSubmit function A callback function to be executed when the form is submitted.
Source:
Returns:
- A form element with input fields and a submit button.
Type
JSX.Element

Inventory(props) → {JSX.Element}

The Inventory component displays inventory information and allows employees to add, update and delete items.
Parameters:
Name Type Description
props object The props object.
Properties
Name Type Description
isManager boolean A boolean indicating whether the user is a manager or not.
Source:
Returns:
- The Inventory component JSX element.
Type
JSX.Element

Login(props) → {JSX.Element}

React functional component for employee login page.
Parameters:
Name Type Description
props Object React props.
Source:
Returns:
- Rendered component.
Type
JSX.Element

(async) OAUTH(params) → {Promise.<boolean>}

Handles OAuth login.
Parameters:
Name Type Description
params Object Login parameters.
Properties
Name Type Description
email string Email address.
pin string PIN number.
Source:
Returns:
- Promise that resolves to `true` if user is valid, `false` otherwise.
Type
Promise.<boolean>

OrderItemButton(props) → {JSX.Element}

A component that renders a button for a specific order item and displays a popup with additional item details when clicked.
Parameters:
Name Type Description
props Object The props object that contains the item object and addToCart function.
Properties
Name Type Description
item Object An object that contains information about the item.
addToCart function A function that adds the item to the cart.
Source:
Returns:
- A button element for the item that displays a popup when clicked.
Type
JSX.Element

OrderItemPane(props) → {JSX.Element}

React component that displays a list of menu items as buttons to order from
Parameters:
Name Type Description
props object Component props
Properties
Name Type Description
addToCart function Function to add an item to the cart
Source:
Returns:
- JSX element with the list of menu item buttons
Type
JSX.Element

PageProtector(children) → {Object}

A component that protects pages from unauthorized access by checking if the user is authenticated
Parameters:
Name Type Description
children Object The components to be rendered within the PageProtector component
Source:
Returns:
The protected component or a page loading message
Type
Object
React component for a pop-up window.
Parameters:
Name Type Description
props Object The props object.
Properties
Name Type Description
item Object The item object.
addToCart function The function to add an item to the cart.
setPopUp function The function to set the pop-up window's visibility.
Source:
Returns:
- The JSX element for the pop-up window.
Type
JSX.Element

PopUpRow(props) → {JSX.Element}

A component that displays a row for a specific inventory item
Parameters:
Name Type Description
props Object The props object
Properties
Name Type Description
inventoryitem Object The inventory item to display in the row
handleExcludeClick function A callback function to call when the user clicks the exclude checkbox
Source:
Returns:
A React component that displays a row for a specific inventory item
Type
JSX.Element

Reports() → {JSX.Element}

Renders a reports page component.
Source:
Returns:
The reports page component.
Type
JSX.Element

RestockRep(props) → {JSX.Element}

React functional component that renders the restock report page for employees.
Parameters:
Name Type Description
props Object Component props
Properties
Name Type Description
isManager Boolean A boolean value indicating if the user is a manager
Source:
Returns:
JSX element representing the restock report page
Type
JSX.Element

Salad() → {JSX.Element}

Renders the Salad component.
Source:
Returns:
Type
JSX.Element

SalesRep(props)

SalesRep component for generating sales reports.
Parameters:
Name Type Description
props Object Component props.
Properties
Name Type Description
isManager boolean Flag indicating if the user is a manager.
Source:

SalesTogetherRep(props) → {JSX.Element}

A component that displays the Sales Together Report page.
Parameters:
Name Type Description
props Object The component props.
Properties
Name Type Description
isManager boolean A boolean indicating if the user is a manager or not.
Source:
Returns:
- The Sales Together Report page.
Type
JSX.Element

Sauces() → {JSX.Element}

The functional component that returns the rendered Sauces menu.
Source:
Returns:
Type
JSX.Element

Sides() → {JSX.Element}

The Sides component.
Source:
Returns:
Type
JSX.Element

Treats() → {JSX.Element}

The Treats page that renders the list of menu items and a navigation bar.
Source:
Returns:
The Treats page with a list of menu items and a navigation bar.
Type
JSX.Element

Weather() → {JSX.Element}

A component that displays the current weather and temperature
Source:
Returns:
- The rendered weather component
Type
JSX.Element

XZRep(props) → {JSX.Element}

A component for displaying and managing XZ Reports.
Parameters:
Name Type Description
props Object The component props.
Properties
Name Type Description
isManager boolean A boolean indicating if the logged-in user is a manager.
Source:
Returns:
- The XZRep component.
Type
JSX.Element

Type Definitions

Cart

The format of the Cart object
Type:
  • Object
Properties:
Name Type Description
total Array.<number> An array with the total cost of the cart
items Object.<string, Array.<any>> An object where the keys are cart IDs and the values are arrays with name, number, cost per item, item ID, and excluded items
Source:
Represents a menu item in the Beverages page.
Type:
  • Object
Properties:
Name Type Description
name string The name of the item.
src string The source of the item image.
key number The unique key of the item.
id number The unique identifier of the item.
Source:

PotentialRecs

Array of objects containing recommended menu items
Type:
  • Array.<{name: string, src: string, key: number, id: number}>
Source: