Skip to content

User Input: States

Kev edited this page Apr 26, 2020 · 2 revisions

States:

1. currentStep

  • Used to switch between steps and to indicate what step you are on.

2. totalPeople

  • This is used for both EZSplit and Detailed Split.
  • Keeps count of the total amount of people you are trying to split with.

3. EZcost

  • This is used for EZSplit.
  • Used to store individual costs.
  • Calculated by EZtotal/totalPeople.

4. EZtotal

  • This is used for EZSplit.
  • Used to store the total cost of the bill.

5. subtotal

  • Used to store the subtotal.

6. tax

  • Used to store the tax.

7. taxPercent

  • Used to store the percent tax.

8. total

  • Used to store the total.

9. orders

  • Is in a form of an array consisting of certain properties.
    * number - An unique ID to keep track of the order value.
    * quantity - The quantity of the order.
    * order - The name of the order.
    * cost - The cost of the order.
    * association - Who is associated with this order.

10. names

  • This is used for Detailed Split.
  • Is in a form of an array consisting of certain properties.
    * number - An unique ID to keep track of the person value.
    * name - The name of each individual person.
    * check - If this user needs to be checked in the database.
    * found - If this user is found in the database.
    * subtotal - The subtotal this individual person has to pay, default at 0.
    * tax - The tax this individual person has to pay, default at 0.
    * total - The total this individual person has to pay, default at 0.

Clone this wiki locally