Skip to content

User Input: Functions

Kev edited this page Apr 26, 2020 · 2 revisions

Functions:

1. wrongStep

  • Redirects the user back to step 1.
  • This function would only activate if there's a BUG.
  • Changes the state.

2. nextStep

  • Moves onto the next step of the multi-step form.
  • Changes the state.

3. prevStep

  • Moves onto the previous step of the multi-step form.
  • Changes the state.

4. nextJump

  • Skips to the Detailed Split part of the multi-step form.
  • Changes the state.

5. prevJump

  • Skips Back to the first part of the multi-step form.
  • Changes the state.

6. handleChange

  • Handles form changes.
  • Changes the state.

7.changeEZTotal

  • Changes the EZ Split total.
  • Changes the state.

8. changeSubtotal

  • Changes the subtotal.
  • Changes the state.

9. changeTax

  • Changes the tax.
  • Changes the state.

10. setTax

  • If there is no tax set, it is defaulted to be 0.
  • Changes the state.

11. changeTaxPercent

  • Using the subtotal and tax, calculate the tax percentage.
  • Changes the state.

12. changeTotal

  • Using the subtotal and tax, calculate the total.
  • Changes the state.

13. changeOrderQuantity

  • Changes the order quantity of an order.
  • Changes the state.

14. checkOrderQuantity

  • Check to see if the order quantity of an order is blank or less than or equal to zero.
  • Results a boolean expression

15. changeOrders

  • Changes the order name of an order.
  • Changes the state.

16. setOrders

  • If there is no order name of an order, it is automatically filled in.
  • Changes the state.

17. changeOrderCost

  • Changes the order cost of an order.
  • Changes the state.

18. checkOrderCost

  • Check to see if the order quantity of an order is blank or less than to zero.
  • Results a boolean expression

19. removeOrderSpecificRow

  • Removes an order.
  • Changes the state.

20. addOrderRow

  • Add an order.
  • Changes the state.

21. changeNames

  • Changes the name of a user.
  • Changes the state.

22. setNames

  • If there is no name of a user, it is automatically filled in.
  • Changes the state.

23. changeCheck

  • Changes the checkbox of a user.
  • Changes the state.

24. userSearch

  • Searches for the user inside the database.
  • Changes the state.

25. checkUsers

  • Checks to see if the users are all found inside the database.
  • Results a boolean expression.

26. removeNameSpecificRow

  • Removes a user.
  • Changes the state.

27. addNameRow

  • Add a user.
  • Changes the state.

28. changeAssociation

  • Changes the association of an order.
  • Changes the state.

29. checkAssociation

  • Check to see if the association of an order is blank.
  • Results a boolean expression

30. resetAssociation

  • It resets the association of an order.
  • Changes the state.

31. setNameSubtotal

  • It sets the subtotal for each user. It uses the association and cost of the order.
  • Changes the state.

32. setNamePayment

  • It sets the tax and total for each user. It uses the subtotal and tax percentages.
  • Changes the state.

33. resetNamePayment

  • It resets the subtotal, tax, and total for each user.
  • Changes the state.

34. setNameTotal

  • It creates a new user that contains the subtotal, tax, and total of all the users.
  • Changes the state.

35. resetNameTotal

  • It removes the new user that contains the subtotal, tax, and total of all the users.
  • Changes the state.

Clone this wiki locally