You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since product quantities are not updated in real-time, it's possible that the quantities are invalid (e.g. a different client checked out some of the same items recently).
Thus, before we submit an order, we should check that the quantities are still valid.
The text was updated successfully, but these errors were encountered:
chrishappy
changed the title
Validate the quantities are valid when creating an order
Validate the product quantities when creating an order
Feb 26, 2022
chrishappy
changed the title
Validate the product quantities when creating an order
Frontend: Validate the product quantities when creating an order
Feb 26, 2022
// TODO: Validate the order before submitting
// Create a new function in cartHelper
// 1. use the promise in usePreviousOrderQuantitiesUpdater(), then
// 2. loop over all the products in the cart and check that the quantity
// that is not greater than the maximum
// 3. if it is, make the color red and disable the button
Since product quantities are not updated in real-time, it's possible that the quantities are invalid (e.g. a different client checked out some of the same items recently).
Thus, before we submit an order, we should check that the quantities are still valid.
The text was updated successfully, but these errors were encountered: