Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Story 8 #8

Open
SVinnik99 opened this issue Jan 5, 2024 · 1 comment
Open

User Story 8 #8

SVinnik99 opened this issue Jan 5, 2024 · 1 comment

Comments

@SVinnik99
Copy link
Owner

No description provided.

@SVinnik99 SVinnik99 converted this from a draft issue Jan 5, 2024
@SVinnik99
Copy link
Owner Author

US-08 Change an existing reservation

As a restaurant manager

I want to be able to modify a reservation if a customer calls to change or cancel their reservation

so that reservations are accurate and current.

Acceptance Criteria

  1. The /dashboard and the /search page will
    • Display an "Edit" button next to each reservation
      • Clicking the "Edit" button will navigate the user to the /reservations/:reservation_id/edit page
    • the "Edit" button must be a link with an href attribute that equals /reservations/${reservation_id}/edit, so it can be found by the tests.
    • Display a "Cancel" button next to each reservation
    • The Cancel button must have a data-reservation-id-cancel={reservation.reservation_id} attribute, so it can be found by the tests.
    • Clicking the "Cancel" button will display the following confirmation: "Do you want to cancel this reservation? This cannot be undone."
      • Clicking "Ok" on the confirmation dialog, sets the reservation status to cancelled, and the results on the page are refreshed.
        • set the status of the reservation to cancelled using a PUT to /reservations/:reservation_id/status with a body of {data: { status: "cancelled" } }.
      • Clicking "Cancel" on the confirmation dialog makes no changes.
  2. The /reservations/:reservation_id/edit page will display the reservation form with the existing reservation data filled in
    • Only reservations with a status of "booked" can be edited.
    • Clicking the "Submit" button will save the reservation, then displays the previous page.
    • Clicking "Cancel" makes no changes, then display the previous page.

Hint The same validation used for create applies to editing a reservation. The form and the API for updating a reservation must not allow the user to violate any of the rules specified when creating a reservation.

@SVinnik99 SVinnik99 moved this from Todo to Done in @SVinnik99's Thinkful Capstone Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant