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 6 #6

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

User Story 6 #6

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-06 Reservation Status

As a restaurant manager

I want a reservation to have a status of either booked, seated, or finished

so that I can see which reservation parties are seated, and finished reservations are hidden from the dashboard.

Acceptance Criteria

  1. The /dashboard page will
    • display the status of the reservation. The default status is "booked"
      • the status text must have a data-reservation-id-status={reservation.reservation_id} attribute, so it can be found by the tests.
    • display the Seat button only when the reservation status is "booked".
    • clicking the Seat button changes the status to "seated" and hides the Seat button.
    • clicking the Finish button associated with the table changes the reservation status to "finished" and removes the reservation from the dashboard.
    • to set the status, PUT to /reservations/:reservation_id/status with a body of {data: { status: "<new-status>" } } where <new-status> is one of booked, seated, or finished. Please note that this is only tested in the back-end for now.

Hint You can add a field to a table in a migration up method by defining a new column. E.g. table.string("last_name", null).notNullable(); will create a new last_name column. Be sure to remove the column in the down function using dropColumn(). E.g. table.dropColumn("last_name");

Hint Use Knex.transaction() to make sure the tables and reservations records are always in sync with each other.

@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