franknoirot/330-cars-frontend

Add reservation validation to Extras and Checkout pages

Opened this issue · 0 comments

There is a subtle edge case that will be hard for users to fall into once the site is live but could cause problems.

By selecting a valid date for one car, returning to the home page, selecting another valid date for a second car, then using the back button to get to the first reservation, it is possible to have an invalid reservation date and car combination on the Extras or Checkout pages.

Avoid this by adding a call to validate the reservation date and car combination on load of this page, and either:

  • Return to the home page (may disorient users trying to get back to the first car)
  • Return to the car's page (probably the best option)
  • Show an error state and disallow advancing to the next step.